On Sun, Nov 30, 2008 at 11:18:21PM -0600, Ken Williams wrote:
> 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.

Hi Ken,

In some ways (but not others) a "configure" script is analogous to
Makefile.PL, and configure scripts will exit with an error is, say,
some dependent library is missing.  But, they are different beasts,
really.

I agree that it makes sense to have the dependencies tested during the
test phase.  After all, if we need version 1.23 of Foo then we
probably should have a failing test for a feature of Foo that didn't
work or didn't exist in earlier versions.

What's probably more common is we add a feature that depends on module
Foo and at the time of integration it was at version 1.23 so that's
the dependency.

We are using a Module::Install::PRIVATE.pm to check for modules
required for running tests and if any are missing then overriding the
test:: target to just spit out a message saying what modules are
missing.

I suppose we could use that same approach for all module dependencies.


> 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.

Thanks, I'll take a look.

-- 
Bill Moseley
[EMAIL PROTECTED]
Sent from my iMutt

Reply via email to