Michael G Schwern wrote:
> On Thu, Apr 25, 2002 at 01:09:06AM +0800, Stas Bekman wrote:
>
>>Currently all Makefile.PL's are runinng inside the same package unless
>>declared explicitly by each Makefile.PL. This leads to problems.
>>
>>For example function redefinition errors under:
>>
>>use strict;
>>use warnings FATAL => 'all';
>>
>>e.g if the parent dir's Makefile.PL and the child both define:
>>
>>sub clean_files {
>> return [@scripts];
>>}
>>
>>redefine warning will kill the makemaker.
>>
>>This can be worked around as:
>>
>>use strict;
>>use warnings FATAL => 'all';
>>no warnings 'redefine';
>>
>>Or declaring a package in each Makefile.PL.
>>
>>But ideally MakeMaker should run child Makefile.PL's in a dedicated
>>package created on the fly by MM (e.g. based on the path):
>
>
> I'd like to do that, but I can't. For backwards compatibility reasons
> Makefile.PL's must be run in package main. It changed accidentally in
> 5.48_01 and it broke several modules.
:(
> It does, unfortunately, shatter the illusion that each Makefile.PL is it's
> own thing. You're welcome to play with ExtUtils::MakeMaker->eval_in_x() to
> throw up more smoke and mirrors, but please make sure it will build PDL and
> Wx.
What about adding a new flag? e.g. if the main Makefile.PL says:
WriteMakefile(
PrivateCompartment => 1,
...
)
then it'll provide one and all children will inherit it unless they
explicitly override it?
That actually sounds like a good idea. Some projects may want to have
their all Makefiles to share main:: others will want these to be
separate. This will give more control to the developers.
> Hmm... how was your Makefile.PL setup working before with 5.6.1's MakeMaker?
> It should have blown up, or at least emitted a warning, there as well.
It's a new setup, in mod_perl 2.0 everything is trying to run under
use strict;
use warnings FATAL => 'all';
So all warnings will be fixed before they even have a chance to be
introduced.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com