On Sun, Nov 30, 2008 at 8:20 PM, Bill Moseley <[EMAIL PROTECTED]> wrote:
>
> One thing I noticed is that Makefile.PL still exists *without* an
> error even if required modules are missing.

That's probably because Makefile.PL is conceived of as a thingy to
make a makefile.  A makefile just lists dependencies between targets.
So if you buy into that design, the proper time to fail is later
(likely during the 'test' phase) when the dependencies are needed.
The Makefile.PL has properly done its job, it's created a proper
makefile, so it doesn't exit with a failure code, and you have to wait
until later (or parse the Makefile.PL output, or find the Magic
Comment in the makefile and check the prereqs yourself) to find
whether there are missing prereqs.

As you point out, that's not very convenient; I think that's one
illustration of why the design isn't an apt one.

If you're also working with Module::Build distributions, note that
Build.PL doesn't exit with a failure code in this situation either,
but it does have at least 2 mechanisms for letting callers explicitly
check dependencies: either look at the _build/prereqs file, or call
the prereq_failures() method.

 -Ken

Reply via email to