version info of package modules

Discussion in 'Perl Misc' started by joe.cipale@radisys.com, Apr 26, 2005.

  1. Guest

    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
     
    , Apr 26, 2005
    #1
    1. Advertising

  2. * 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
     
    Fabian Pilkowski, Apr 26, 2005
    #2
    1. Advertising

  3. Steven Kuo Guest

    On 26 Apr 2005, 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 <>)
    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
     
    Steven Kuo, Apr 26, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page