Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > version info of package modules

Reply
Thread Tools

version info of package modules

 
 
joe.cipale@radisys.com
Guest
Posts: n/a
 
      04-26-2005
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

 
Reply With Quote
 
 
 
 
Fabian Pilkowski
Guest
Posts: n/a
 
      04-26-2005
* http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
Steven Kuo
Guest
Posts: n/a
 
      04-26-2005
On 26 Apr 2005, (E-Mail Removed) 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 <(E-Mail Removed)>)
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
Importing a package and looping through modules in the package Dave Python 2 02-10-2004 08:14 PM



Advertisments