V - Print version of the specified module(s).
$ perl -MV=V
or if you want more than one
$ perl -MV=CPAN,V
Can now also be used as a light-weight module for getting versions of modules without loading them:
BEGIN { $V::NO_EXIT = 1 } require V; printf "%s has version '%s'\n", "V", V::get_version( "V" );
This module uses stolen code from Module::Info to find the location and version of the specified module(s). It prints them and exit()s.
It defines import() and is based on an idea from Michael Schwern on the perl5-porters list. See the discussion:
import()
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2002-01/msg00760.html
Abe Timmerman <abeltje@cpan.org>.
<abeltje@cpan.org>
Copyright 2002-2006 Abe Timmerman, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install V, copy and paste the appropriate command in to your terminal.
cpanm
cpanm V
CPAN shell
perl -MCPAN -e shell install V
For more information on module installation, please visit the detailed CPAN module installation guide.