Get the damned version
Module versions can be found using several ways. I know two.
You can use the module in a one liner and print the module's $VERSION variable:
perl -MSVG -le'print $SVG::VERSION'
This gets annoying when the module name gets long:
perl -MWWW::Mechanize -le'print $WWW::Mechanize::VERSION'
Or the insane:
perl -MPOE::Component::WWW::Pastebin::Bot::Pastebot::Create -le'print $POE::Component::WWW::Pastebin::Bot::Pastebot::Create::VERSION'
Another method I've seen people use is to actually cause an error. Try to load the module in a high version that doesn't exist. The error will show what version it is:
perl -MWWW::Mechanize\ 9999
perl -MPOE::Component::WWW::PasteBin::Bot::Pastebot::Create\ 9999
This is pretty good, since it's short to write and most likely you won't find many versions above 9999 (except perhaps, File::Slurp - last version 9999.13). However, this is a bit confusing to newbies, trying to cause an error on purpose to simply find the version.
Moreover, since it causes a compilation error, you can't easily check multiple versions.
I like this new way better:
$ module-version WWW::Mechanize
$ module-version --full WWW::Mechanize SVG Moose
Warning: module 'SVG' does not seem to be installed.
And so on.
If you like it too, you can install Module::Version and have it. There's a few more options there like input from files and no warnings (
EDIT: I've renamed the program to mversion.