in reply to Finding version of a Perl module
I have this shell function (zsh, but it should work for most Korn-ish shells):
pmver () { perl -le "eval { require ${1} }; if( \$@ =~ /locate (\S+)\.pm/ ) { p +rint qq{${1} not installed}; exit 1; } print qq{${1}: },\$${1}::VERSI +ON||q{undefined}" }
It's used like this:
$ pmver CGI CGI: 3.05 $
|
---|