[Perl Module] How can I look up the version of CPAN module?

1.  perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Proc::PID::File

2. perl -MProc::PID::File -le 'print $Proc::PID::File::VERSION'

(If you are lucky, the module will have a package variable $VERSION)

3. perl -MProc::PID::File 9999

Proc::PID::File version 9999 required--this is only version 1.24.
BEGIN failed--compilation aborted.

I rate 5 star to the 1st one, however, the 3rd one is the most funny one :P --Azure

原文地址:https://www.cnblogs.com/sanquanfeng/p/3358588.html