donno20 has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, How to check an installed module's version ?

Replies are listed 'Best First'.
Re: Checking installed module version
by gellyfish (Monsignor) on Jun 20, 2003 at 09:50 UTC

    Assuming the module has been properly installed then you should be able to do:

    perl -MSomeModule -e'print $SomeModule::VERSION'
    Of course replacing 'SomeModule' with the name of the module that you want to find the version of.
    /J\
    

Re: Checking installed module version
by adrianh (Chancellor) on Jun 20, 2003 at 10:09 UTC

    If you don't want to load the module then Module::Info can grep it out of the source in the same way CPAN does. It also has some convenience routines for dealing with sites that have modules installed more than once.

Re: Checking installed module version
by nite_man (Deacon) on Jun 20, 2003 at 09:51 UTC
    Use variable $VERSION:
    use Data::Dumper; print $Data::Dumper::VERSION; __DATA__ 2.12
          
    --------------------------------
    SV* sv_bless(SV* sv, HV* stash);