mapmodule
mapmodule [options]
Options: -a|-all locate all children of specified modules -e|-exe <filepath> pathname to an executable script -h|-help display this help and exit -I|-useINC search in @INC after searching any specified local directories -l|-lib <path> search <path> for modules -M|-module <module> a module to search for (in X::Y::Z format) -o|-out|-output <path> target root directory mapped paths -p|-pod include POD files (ending in .pod) in search -P|-project root project directory (for project mode only)
Multiple source modules, executables, and libraries may be specified, e.g.,
mapmodule -a -o ./sources -I -l ./lib1 -l ./lib2 -M Some::Module -e ./bin/mapmodule
searches ./lib1, ./lib2, and @INC for the first occurance of Some/Module.pm, and maps the results to ./sources/lib/Some/Module.pm if found in @INC, or ./sources/blib/Some/Module.pm if found in ./lib1 or ./lib2, and also maps ./bin/mapmodule to ./source/bin/mapmodule. If the directory where Some::Module was found has a Module directory, it will recurse through it to map all the child module files found.
If none of -l, -e, or -M is specified, collects all modules found in './lib' and all files in './bin' (aka "project mode"), e.g.,
mapmodule -o ./sources
will map all modules under ./lib to ./sources/blib and all scripts under ./bin to ./sources/bin.
Using Module::Mapper, searches either specified directories, or @INC (or both) for the specified module(s) or executable(s). Prints the full path where the sources were found and (optionally) a mapping output path if the -o options was specified.
If -o is specified, then the output path is mapped as follows:
Source Type Location ----------- ------------------------ executables <path>/bin local modules <path>/blib @INC modules <path>/lib
To install Module::Mapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Module::Mapper
CPAN shell
perl -MCPAN -e shell install Module::Mapper
For more information on module installation, please visit the detailed CPAN module installation guide.