On Wed, Oct 09, 2002 at 12:44:32PM -0400, Norton Allen wrote:
> First, in order to allow
>
> perl Makefile.PL CGI_DIR=/path/to/cgi
>
> I had to add:
>
> $ExtUtils::MakeMaker::Recognized_Att_Keys{CGI_DIR} = 1;
>
> This is undocumented, and hence potentially breakable. Should
> this be documented, or is there a better way?
It shouldn't be documented, that's definately mucking with internals. There
currently is no safe way to tell MakeMaker "I'm taking these extra
arguments". One will have to be added, probably as a WriteMakefile argument
*wink wink, nudge nudge* and the technique added to the FAQ.
> but that didn't work because it's too late. The right answer
> appears to be to check within an overridden method:
>
> sub MY::postamble {
> my $mm = shift;
> $mm->{CGI_DIR} = prompt( 'Where should cgi scripts be installed? ' )
> unless $mm->{CGI_DIR};
> "
> CGI_DIR=$mm->{CGI_DIR}
> install ::
> cp -vn cgi/CRRun \$(CGI_DIR)/CRRun
> ";
> }
>
> (This query might live better in MY::post_constants(). Sanity
> checking of the entered value is definitely a good idea as
> well!)
That's about right. It would go into ExtUtils::MakeMaker::FAQ.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
7a. Good, Fast, Cheap: Pick any two (you can't have all three).
-- RFC 1925