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

Re: Finding version of a Perl module

by Fletch (Chancellor)
on Sep 09, 2005 at 12:51 UTC ( #490551=note: print w/replies, xml ) Need Help??


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 $

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://490551]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2021-06-16 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (74 votes). Check out past polls.

    Notices?