On 12 Jul 2006 11:52:07 -0000, Rafael Garcia-Suarez
<[EMAIL PROTECTED]> wrote:

> "Gabor Szabo" wrote in perl.qa :
> > While checking if the versions of all the modules are as
> > required in our installation I am using the following one liner to
> > fetch the version numbers.
> >
> > perl -MModule -e'print $Module::VERSION'
> 
> You should probably use -mModule to avoid calling Module::import().
> (also, in some pathological cases, one can imagine that
> UNIVERSAL::VERSION() has been overidden)
> 
> Side note:
> Abe Timmerman has a module, V, useful to get versions
> of installed modules:
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2006-03/msg01038.html

I never use -m. I should :)

# perl -mV -le'print V::get_version("DBI")'
1.51

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x  on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0, AIX 4.3 & 5.2, and Cygwin.       http://qa.perl.org
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org
                       http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to