Re: [Module-build-general] Question about Defaults ...
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2003-03-15 12:33:35
|
On 3/14/2003 6:09 PM, Nicholas Clark wrote:
> On Fri, Mar 14, 2003 at 12:45:17PM -0600, Dave Rolsky wrote:
>
>>h2xs for module creation needs to die along with MakeMaker ;)
>
>
> and xsubpp (being worked on, IIRC) etc
>
> h2xs isn't going to die in 5.8.1
> But I suspect that there's still time to get a patch for 5.8.1 in to add an
> option to h2xs to make the module use Module::Build rather than MakeMaker
>
> Nicholas Clark
>
This brings to mind a problem I've run into: What about CPAN authors who
want to provide both Makefile.PL and Build.PL during the transition for
backwards compatibility? When I try this Makefile.PL wants execute
Build.PL as a self-extracting script. Maybe this has come up before, but
I couldn't find any references.
Two options that immediately come to mind are:
* Require that the PL_FILES option be specified in the Makefile.PL even
if it is an empty array so that MM doesn't perform its auto search for
PL files.
* Add something like the following to the top Build.PL:
BEGIN { # Don't let it MakeMaker extract me && substitute my variables.
exit if @ARGV == 1 && $ARGV[0] eq 'Build';
}
What is the best way to handle this scenario? I'm currently using the
second. Although its a hack, it feels like a better solution than
requiring authors to change their existing Makefile.PL to explicitly
mention every PL file.
Randy.
--
A little learning is a dang'rous thing;
Drink deep, or taste not the Pierian spring;
There shallow draughts intoxicate the brain;
And drinking largely sobers us again.
- Alexander Pope
|