Why are you trying to get the module version? Do you need this from within the program, you just need the number to go to another operation, or are you just trying to find out what you have?
I have a built-in cpan (which comes with perl) with the -D switch so that you can see the version you installed and the current version in CPAN:
$ cpan -D Text :: CSV_XS
Text :: CSV_XS
-------------------------------------------------- -----------------------
Fast 8bit clean version of Text :: CSV
H / HM / HMBRAND / Text-CSV_XS-0.54.tgz
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/Text/CSV_XS.pm
Installed: 0.32
CPAN: 0.54 Not up to date
H.Merijn Brand (HMBRAND)
hmbrand@xs4all.nl
If you want to see all obsolete modules, use the -O (capital O) switch:
$ cpan -O
Module Name Local CPAN
-------------------------------------------------- -----------------------
Apache :: DB 0.1300 0.1400
Apache :: SOAP 0.0000 0.7100
Apache :: Session 1.8300 1.8700
Apache :: SizeLimit 0.0300 0.9100
Apache :: XMLRPC :: Lite 0.0000 0.7100
... and so on
If you want to see this for all the modules you have installed, try using the -a switch to create autorun.
brian d foy Sep 25 '08 at 21:19 2008-09-25 21:19
source share