pmq

This tool is intended to be a user-friendly answer to the two FAQs, 'how do I find what version of a Perl module is installed?' and 'how do I list all modules installed on the system?'

pmq Date::Manip will print the version of the Date::Manip module, or '(failed)' if the module is not installed, or for some modules which don't carry version information, '(unknown)'. pmq --all will print every module found in Perl's include path with its version.

By default, pmq uses a fast method of looking for a line setting the version and evaluating just that line. (In fact it calls the routines provided by MakeMaker, which is a standard part of recent perl5 installations.) But with --method=load you can ask pmq to really load the module and then ask for its version. This provides a better test of whether the module is installed and working, rather than just physically present, but it is much slower. Still more thorough and slower still is --method=fork, which loads each module in a separate process. Of course even that cannot promise that the module actually works ;-).

Download

The latest release is 0.1.5, which works correctly when there are trailing slashes in PERL5LIB.

Installing

Installation is the same as for Perl modules: 'perl Makefile.PL', 'make', 'make install'. You may want the argument 'PREFIX=/whatever' to Makefile.PL.

Copying

All the files are in the public domain. This means there are no copyright restrictions, you may do what you wish with them. Of course, giving credit would be appreciated (but not required).

They are offered as-is with no warranty whatsoever.

Bugs

Pmq tries hard to sanitize its output and reduce it to a simple version number, '(unknown)' or '(failed)' no matter what weird messages the module wants to print. But for some reason this doesn't always work in the 'fork' mode, when error messages can leak to stdout. I'm trying to work out why this is.

Author

Please contact me, Ed Avis <ed@membled.com> with any suggestions or bug reports. The pmq web page is http://membled.com/work/perl/pmq/.

Related

You could use Module::ScanDeps to find all the modules required by a program.


Ed Avis
Last modified: Mon Aug 22 13:40:00 BST 2005