Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I find the version of an installed Perl module?

How do you find the version of an installed Perl module?

This is in an answer down at the bottom, but I figure it important enough to live up here. With these suggestions, I create a function in my .bashrc

function perlmodver {     perl -M$1 -e 'print "Version " . $ARGV[0]->VERSION . " of " . $ARGV[0] . \     " is installed.\n"' $1 } 
like image 941
Drew Stephens Avatar asked Sep 25 '08 20:09

Drew Stephens


People also ask

How do I find perl version in Linux?

To find the version run perl -v command. Latest version of perl can get from ActiveState perl site.

How do I find my perl?

Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page. You can also type above command under Windows / Mac OS X by opening terminal.


1 Answers

Most modules (especially ones from The CPAN) have a $VERSION variable:

perl -MSome::Module -le 'print $Some::Module::VERSION' 
like image 146
zigdon Avatar answered Sep 20 '22 01:09

zigdon