Perl module versions
From Brandonhutchinson.com
(Difference between revisions)
| Line 3: | Line 3: | ||
Example: Determine the version number of ''XML::Parser''. | Example: Determine the version number of ''XML::Parser''. | ||
$ '''perl -MXML::Parser -e 'print "$XML::Parser::VERSION\n"'''' | $ '''perl -MXML::Parser -e 'print "$XML::Parser::VERSION\n"'''' | ||
| + | 2.34 | ||
=== Multiple module example === | === Multiple module example === | ||
Current revision
Single module example
Example: Determine the version number of XML::Parser.
$ perl -MXML::Parser -e 'print "$XML::Parser::VERSION\n"' 2.34
Multiple module example
Example: Determine the version numbers of XML::Parser, XML::SAX, XML::SAX::Expat, and XML::Simple.
$ for MODULE in XML::Parser XML::SAX XML::SAX::Expat XML::Simple ; do
> perl -M${MODULE} -e "print \"$MODULE \$${MODULE}::VERSION\n\""
> done
XML::Parser 2.34
XML::SAX 0.14
XML::SAX::Expat 0.37
XML::Simple 2.14
