On Mon, Mar 25, 2002 at 09:04:43PM +1100, Ken Williams wrote:
> >>   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.

When there is no universal solution, a solution which is at least as
good as any other will go.  And what I wrote is such a solution.

The security-conscious would add is_absolute_path($^X) to -x $^X to
avoid writable-current-directory attack.  But this looks irrelevant in
the context of building a module...

Ilya

Reply via email to