version info of package modules

J

joe.cipale

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
 
F

Fabian Pilkowski

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
 
S

Steven Kuo

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 <[email protected]>)
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top