Re: $^X rather than $Config{perlpath}
Gisle Aas (gisle@aas.no)
12 Apr 1999 13:37:46 +0200
Roderick Schertler <roderick@argon.org> writes:
> This replaces $Config{perlpath} with $^X. This is, I think, more correct
> and simpler anyway. $Config{perlpath} is generally /usr/local/bin/perl
> so it won't be correct if multiple versions are installed but the user is
> running a different one.
I was under the impression that you can't trust $^X (not always an
absolute path when that is what you need). Am I wrong?
If $Config{'perlpath'} is wrong, than your perl installation is bad
(or you have not installed your perl yet).
Regards,
Gisle
> Index: t/local/http.t
> --- libwww-perl-5.42/t/local/http.t Fri Mar 19 16:09:34 1999
> +++ libwww-perl/t/local/http.t Wed Apr 7 15:36:45 1999
> @@ -35,8 +35,7 @@
> exit;
> }
> else {
> - use Config;
> - open(DAEMON, "$Config{'perlpath'} local/http.t daemon |") or die "Can't exec daemon: $!";
> + open(DAEMON, "$^X local/http.t daemon |") or die "Can't exec daemon: $!";
> }
>
> print "1..18\n";
> Index: t/robot/ua.t
> --- libwww-perl-5.42/t/robot/ua.t Fri Mar 19 16:10:08 1999
> +++ libwww-perl/t/robot/ua.t Wed Apr 7 15:51:06 1999
> @@ -36,8 +36,7 @@
> exit;
> }
> else {
> - use Config;
> - open(DAEMON , "$Config{'perlpath'} robot/ua.t daemon |") or die "Can't exec daemon: $!";
> + open(DAEMON , "$^X robot/ua.t daemon |") or die "Can't exec daemon: $!";
> }
>
> print "1..7\n";