[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dh-make-perl can't find Makefile.PL though it exists



On Wed, Sep 05, 2007 at 02:46:34PM +0200, Jeremiah Foster wrote:
> I used dh-make-perl like this:
> dh-make-perl --cpan XML::XPathEngine
> 
> It produced this error:
> 
> Could not find the dependencies for the requested module
> Module::Depends::Intrusive reports: /home/jeremiah/code/perl/debian- 
> perl/tarballs/HTML-TreeBuilder-XPath-0.08/XML-XPathEngine-0.08-JcqlvI/ 
> Makefile.PL did not return a true value at /usr/share/perl5/Module/ 
> Depends/Intrusive.pm line 76.
> 
> But the CPAN untarring produced: XML-XPathEngine-0.08/Makefile.PL.  
> And doing an 'ls' on the above created dir reveals the Makefile.PL  
> and that Makefile.PL uses MakeMaker, not Module::Install.
> 
> Is this a bug?

I would argue it is not. The Makefile.PL of XML::XPathEngine
is just evil... It contains this code:

unless( `$^X -n -e'print if( m{license\\s*:\\s*perl})' Makefile`)
  { system $^X . q{ -p -i -e's{^((.*)distribution_type:module(.*))}{$1\n$2license: perl$3}m' Makefile}; }

I guess that the module in question (Module::Depends::Intrusive) tries
to load the Makefile.PL without actually creating Makefile which leads
the code quoted above to fail which leads to the error you see.

You can fix that by either adding 1; at the end of Makefile.PL or just
uncommenting the failing code. If you run dh-make-perl again after doing
that it will work just fine.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/



Reply to: