Perl module versions

From Brandonhutchinson.com

Jump to: navigation, search

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

Links

Personal tools