Stephen Zander <[EMAIL PROTECTED]> wrote: > Sam> Hi all, How do you return the name of perl in your module's > Sam> Makefile.PL? > If you're generating rules for the Makfile that will be produced, > don't try to hardcode perl at all. Rather use the PERL Makefile > variable that MakeMaker has already gone to great pains to get right > for you.
OK, I've tried this - the following code is an example of how to get MakeMaker's variables in a Makefile.PL: <<<<<<<< use ExtUtils::MakeMaker; # If this function is not called manually on older versions of # ExtUtils::MakeMaker, it goes tits up. ExtUtils::MakeMaker::full_setup(); my $mm = MM->new({ 'NAME' => 'Pod::Constants', ... }); open TEMPFILE, "t/tempfile" or die $!; print TEMPFILE, $mm->{FULLPERL},"\n"; close TEMPFILE; $mm->flush(); <<<<<<<< In the test script, you have to open "t/tempfile" to get the contents. It's a hack, but it works. Tested with 5.00503 and 5.6.1. I fall back to the $Config{perlpath} and $^X variables in the event of a failure with this method. There should be an easier way. Cheers, -- Sam Vilain, [EMAIL PROTECTED] WWW: http://sam.vilain.net/ 7D74 2A09 B2D3 C30F F78E GPG: http://sam.vilain.net/sam.asc 278A A425 30A9 05B5 2F13 Hi, I'm a .signature virus! Copy me into your ~/.signature, please!