Re: Makefile.PL's with dependancies (was DBI Build error in36 line)

[email protected] (Tyler MacDonald)
Newsgroups perl.cpan.discuss,perl.dbi.users
Message-ID <[email protected]>
Sridhar Madadi <[email protected]> wrote:
> Hi All,
> 
> When I am trying to build DBI module, I am getting the below error. I am 
> running per 5.8.0 version

	It looks like the perl in your path isn't 5.8.0, even if you have a
5.8.0 package installed:

> Can't locate Test/More.pm in @INC (@INC contains: lib 
> /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib 
> /usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 
> /usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int 
> /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at Makefile.PL 
> line 36.

	Those are all 5.6.1 paths. Maybe you need to run
/opt/something/bin/perl instead?

	However, this reveals a more sinister problem with the Makefile.PL
in DBI:

use Test::Harness;      # tests use it so check it's loadable early
use Test::More 0.4;     # tests use it so check it's loadable early

	Those should probably just be handled by PREREQ_PM; CPAN will then
attempt to download the latest version if it's not installed; the
Makefile.PL will advise the user that these dependancies haven't been met;
if the user plows ahead and installs anyways, the tests may fail but at
least the code will still work.

	IMHO the only timea package should be "use"d in a Makefile.PL is if
the Makefile.PL itself needs it to make decision, and then it should fail
gracefully.

	In DBI's case it isn't neccessary at all. But I am working on some
modules where the Build.PL/Makefile.PL will require extra modules in order
to function. Is there currently a way to make CPAN/CPANPLUS re-run
Build.PL/Makefile.PL after dependancies have been satisfied? Especially
cosnidering that unlinking "Makefile" won't do the trick, since the
dependancies are often grabbed from there....

		- Tyler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.