On Thursday, March 21, 2002, at 05:19 PM, Ilya Zakharevich wrote:
> On Thu, Mar 14, 2002 at 11:38:38AM +0100, Wim Verhaegen wrote:
>>> How do you return the name of perl in your module's Makefile.PL?
>>
>> use Config;
>> $perl = $Config{perlpath};
>
> This is very wrong. This is what libwww is using; as a result, you
> cannot test libwww with uninstalled Perl.
>
> *At* least use
>
> (-x $^X) ? $^X : $Config{perlpath};
I agree that $Config{perlpath} is wrong, but no great right solution
seems to present itself. What's a script to do if it wants to invoke
the same perl executable that's currently running? In some cases
neither $^X or $Config{perlpath} will do the trick. $^X won't work
because it might just be something like 'perl' and not resolve correctly
in the PATH, and $Config{perlpath} won't work because it doesn't change
values to reflect the true location of the perl executable if it moves
after (or before!) installation.
Anyway, I'd love to know some way of handling this. It'd be useful for
Module::Build. Currently I'm just using $Config{perlpath}.
-Ken