Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Retrieve list of used modules and their version numbers

by jmcnamara (Monsignor)
on Sep 07, 2006 at 11:54 UTC ( #571664=note: print w/replies, xml ) Need Help??


in reply to Retrieve list of used modules and their version numbers


Here is a similar one that runs from the command line.
#!/usr/bin/perl -w use strict; for my $module (@ARGV) { my $version; eval "require $module"; if (not $@) { $version = $module->VERSION; $version = '(unknown)' if not defined $version; } else { $version = '(not installed)'; } printf " %-24s\t%s\n", $module, $version; } __END__ # Sample output. $ perl modver.pl Encode Foo strict Error::Simple Encode 2.10 Foo (not installed) strict 1.03 Error::Simple (unknown)

--
John.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://571664]
help
Chatterbox?
and the daffodils sway...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-02-24 20:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (363 votes). Check out past polls.