This additional
~$ cpan -l
There are several ways to obtain the list of perl modules installed in a system:
-- Using perldoc
There are 2 commands, depending of the kind of perl module:
perldoc perlmodlib
'perldoc perlmodlib' list the modules that come preinstalled with the standard perl package.
perldoc perllocal
'perldoc perllocal' lists the optional modules that are installed in your system that don't come with perl by default.
This command returns lots of useful information for every optional module installed, like the installation date, the directory where the module was installed, the module version number, etc.
-- Using a script
If you want to obtain the list of all modules installed using a script, you may use the following one-liner (have a look at 'perldoc perlmodlib' for details about this one-liner):
perl -MFile::Find=find -MFile::Spec::Functions -Tlw
-e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ },
no_chdir => 1 }, @INC'
-- If using ActivePerl
If you use ActivePerl (very likely if you're using Perl in Windows), you may use the following command to obtain the list of modules:
ppm query
No comments:
Post a Comment