 |
| |
[07/19/2011]
Get a List of Perl Modules Installed on a Server
By: Mark Jacobsen
Here's how to get a list of the perl modules installed on a server.
In a linux/unix environment, execute the following one-liner on the command line:
perl -MFile::Find=find -MFile::Spec::Functions -Tlw -e 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1}, @INC'
On a windows box the exact same thing works execpt you must use double quotes (prior to the word find and at the end). Note that you must use single quotes in a unix environment.
perl -MFile::Find=find -MFile::Spec::Functions -Tlw –e "find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1}, @INC"
On a windows box you can also execute the following at a DOS prompt:
ppm query *
This gives a prettier list, and includes version numbers as well as a one line comment as to what the modules does.
Note that the other methods do not provide version information.
However any module should dump it's version number given the following command line:
perl –M -e 'print "$::VERSION \n" '
example: perl –MCGI -e 'print "$CGI::VERSION \n" '
So with a little effort the output of the first commandline could be run through a loop through the above, and a dump of the modules with version numbers could be had.
===================
Mark Jacobsen: I hope you have found this article or tip helpful. If so, please consider making a donation. 100% of all proceeds will be directed to charity: water.
Contact me at MarkJacobsen.net or @MarkJacobsen
|
|
 |
Thanks for stopping by. Please be sure to visit some of my sites for your communication needs: Toll Free Virtual PBX, Real Estate Call Capture, Hosted PBX, and Virtual Fax.
All News Articles...
|
|