| Search perlmeme.org | |
| Home » Faqs » Documentation » Module version |
If you have cpan installed (type cpan in your command prompt), then
you can use:
i ModuleName
For example:
i CGI
will produce something like the following output:
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Tue, 24 Feb 2004 17:50:14 GMT
Strange distribution name [CGI]Module id = CGI
CPAN_USERID LDS (Lincoln D. Stein <lstein@cshl.org>)
CPAN_VERSION 3.04
CPAN_FILE L/LD/LDS/CGI.pm-3.04.tar.gz
MANPAGE CGI - Simple Common Gateway Interface Class
INST_FILE /usr/local/lib/perl5/5.6.1/CGI.pm
INST_VERSION 2.89
You can use perl from the command line to determine the module version.
perl -M[modulename] -e 'print "$[modulename]::VERSION\n";'
For example:
perl -MCGI -e 'print "$CGI::VERSION\n";'
This would produce something like:
2.89
Like solution 2, you can use perl from the command line to determine the module version, only the quotes are slightly different:
perl -M[modulename] -e "print \"$[modulename]::VERSION\";"
For example:
perl -MCGI -e "print \"$CGI::VERSION\";"
From your command line you can type 'ppm'. If you type in:
query
ppm will display information about the modules installed. This does not include standard perl modules, so, for example,
query CGI
will not return any data. However:
query DBI
will return something like:
DBI [1.14] Database independent interface for Perl