Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

RE: Find perl module version from command-line

by KM (Priest)
on Oct 18, 2000 at 16:53 UTC ( #37318=note: print w/replies, xml ) Need Help??


in reply to Find perl module version from command-line

This is how I do it for checking one module.. I use CPAN to check multiple:

perl -MMODULE -e 'print $MODULE::VERSION';

Of course, if the module author doesn't put the suggested $VERSION variable in, this won't work :)

Cheers,
KM

Replies are listed 'Best First'.
RE: RE: Find perl module version from command-line
by lachoy (Parson) on Oct 18, 2000 at 22:24 UTC

    Right! This is what I meant by perl -e in my writeup. but I thought it was getting kind of tedious to type this in every time... TMTOWDI.

Re^2: Find perl module version from command-line
by ambrus (Abbot) on Feb 21, 2012 at 16:32 UTC

    A nice shortcut is

    perl -e 'use Some::Module 9e9'
    It is worth noting that perl -MSome::Module=9e9 -e1 works only if that module is Exporter-based, because -M passes that number as an import argument instead of a version number, but then Exporter interprets it as a version number.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://37318]
help
Chatterbox?
[MidLifeXis]: hahaha: Just received a buzz-word-bingo- compliant email (internal) that starts with "%Firstname% %Lastname%...". It only gets better from there.
choroba finds working in a small company boring comparing to a large corporation
[MidLifeXis]: At least test before mass distribution.
[MidLifeXis]: More opportunities for anonymous snafus :-)
[MidLifeXis]: In a small group / company, at least you know who needs to buy the next round of beer for their mess-up.
[MidLifeXis]: :-)
[Discipulus]: are sure you are not really named "%Firstname% %Lastname%..." ? have you check your identity card?

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2017-01-19 12:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.