Home > Archive > PERL Miscellaneous > April 2005 > version info of package modules
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
version info of package modules
|
|
| joe.cipale@radisys.com 2005-04-26, 3:59 pm |
| I am in the midst of a software audit of all of our perl pacakges.
Some pacakges installed compnay wide are older than others. What I want
to know is the version of a given pacakge. I know I can type perl -v
and get the current release of the perl interpreter. But I would like
to get the version string for a package, like SNMP.
Thanks in advance!
Joe
| |
| Fabian Pilkowski 2005-04-26, 3:59 pm |
| * joe.cipale@radisys.com schrieb:
> I am in the midst of a software audit of all of our perl pacakges.
> Some pacakges installed compnay wide are older than others. What I want
> to know is the version of a given pacakge. I know I can type perl -v
> and get the current release of the perl interpreter. But I would like
> to get the version string for a package, like SNMP.
It is common that each published package has a var named $VERSION but
it's not preinstructed. Try to print out this var for your module like:
use SNMP;
print $SNMP::VERSION;
The current SNMP package (from CPAN) yields '4.2.0' when executing this
print-statement. Sure, this could be done in the shell too.
$ perl -MSNMP -e'print $SNMP::VERSION'
regards,
fabian
| |
| Steven Kuo 2005-04-26, 3:59 pm |
| On 26 Apr 2005, joe.cipale@radisys.com wrote:
> I am in the midst of a software audit of all of our perl pacakges.
> Some pacakges installed compnay wide are older than others. What I want
> to know is the version of a given pacakge. I know I can type perl -v
> and get the current release of the perl interpreter. But I would like
> to get the version string for a package, like SNMP.
>
> Thanks in advance!
>
> Joe
You may want to try using the CPAN shell; it has commands to show the
version number of installed modules, the version number of the latest
CPAN modules, and a list recommending modules for reinstall:
$ perl -MCPAN -e shell
cpan> m SNMP
Module id = SNMP
DESCRIPTION Interface to the UCD SNMP toolkit
CPAN_USERID GSM (Joe Marzot <gmarzot@baynetworks.com> )
CPAN_VERSION 4.2
CPAN_FILE G/GS/GSM/SNMP-4.2.0.tar.gz
DSLI_STATUS RdcO (released,developer,C,object-oriented)
INST_FILE (not installed)
cpan> r
Package namespace installed latest in CPAN file
B::Utils 0.04_01 0.05 J/JJ/JJORE/B-Utils-0.05.tar.gz
CGI 3.05 3.07 L/LD/LDS/CGI.pm-3.07.tar.gz
Class::ISA 0.32 0.33 S/SB/SBURKE/Class-ISA-0.33.tar.gz
etc.
--
Hope this helps,
Steven
|
|
|
|
|