It may be relevant to this discussion - about parse_version() failing
to find the $VERSION in a module which doesn't set it in a single
line - that I've just released version 0.1 of the 'pmq' utility, which
prints the installed version of modules.

Pmq has three ways of finding out the version.  The fastest way is to
call ExtUtils::MM_Unix, which parses the module's program text and
looks for a VERSION line.  But pmq can also use a slower mode where it
tries to require() the module and look at its version.  That will work
with code which does weird things, and also provides a more thorough
check that the module can actually be loaded (rather than just being
present in the filesystem).  The third mode forks a new process to
load the module, to avoid the main program being 'contaminated'.

For ExtUtils::MakeMaker it is probably best to keep the existing setup
and tell module authors to set VERSION in a particular way.  But a
successor could try the more exotic approach for checking
dependencies.  For VERSION_FROM type stuff it's less use, because the
module to be installed might not be loadable straight out of the
source directory.

Anyway you can find pmq at <http://membled.com/work/perl/pmq/>.

-- 
Ed Avis <[EMAIL PROTECTED]>


Reply via email to