Possible Duplicate:
How can I find the version of an installed Perl module?
I tried perl -MMODULE -e 'print Thread::Semaphore';
, but it did not work! What is the right command?
Possible Duplicate:
How can I find the version of an installed Perl module?
I tried perl -MMODULE -e 'print Thread::Semaphore';
, but it did not work! What is the right command?
I found something interesting I would like to share:
perl -MThread::Semaphore\ 9999
It is a neat trick to find our version!!!
Assuming that the module has $VERSION
defined (which is where the module version is canonically stored), this will get you the version:
perl -MModule -e 'print "$Module::VERSION\n";'
You could use pm_which
to find out what version a module, or a list of modules are.
$> pm_which -mV Thread::Semaphore Thread
Thread::Semaphore [ 2.12 ] Thread [ 3.02 ]
pm_which
is a front end for Module::Util, which has more methods for finding out about installed modules.
perl -e 'eval {require Thread::Semaphore;print "Thread::Semaphore => ", $Thread::Semaphore::VERSION,"\n";}; print "\033[31mmissing Thread::Semaphore\033[0m\n";'
Here's what I had posted on Find & Checking Modules Used by Perl Programs