App::whichpm - locate a Perl module and it's version
use App::whichpm 'which_pm'; my ($filename, $version) = which_pm('App::whichpm'); my $filename = App::whichpm::find('App::whichpm');
from shell:
whichpm App::whichpm whichpm Universe::ObservableUniverse::Filament::SuperCluster::Cluster::Group::Galaxy::Arm::Bubble::InterstellarCloud::SolarSystem::Earth
Loads a given module and reports it's location and version.
The similar function can be achieved via:
perldoc -l Some::Module perl -MSome::Module -le 'print $INC{"Some/Module.pm"}' perl -MSome::Module -le 'print Some::Module->VERSION' pmpath Some::Module pmvers Some::Module
same as "find" only exported under which_pm name.
which_pm
Loads the $module_name.
$module_name
In scalar context returns filename corresponding to $module_name. In array context returns filename and version.
$module_name can be either Some::Module::Name or Some/Module/Name.pm
Some::Module::Name
Some/Module/Name.pm
http://perlmonks.org/?node=whichpm, pmpath, Module::InstalledVersion, Module::Info
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Jozef Kutej
To install App::whichpm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::whichpm
CPAN shell
perl -MCPAN -e shell install App::whichpm
For more information on module installation, please visit the detailed CPAN module installation guide.