On Wed, Dec 12, 2001 at 11:11:39AM +0100, Rafael Garcia-Suarez wrote:
> Hi, I located a problem : the Inline module won't work with a Perl
> configured with the -Dversiononly Configure symbol.
>
> That's because it uses $Config{perlpath}, which has a buggy value :
> it points to /your/path/to/perl instead of /your/path/to/perl5.6.1
> (with -Dversiononly, all the programs installed have a trailing version
> number).
>
> The problem with $Config{perlpath} will be fixed in perl 5.8.0, but
> for older perls, I suggest to fall back to $^X.
This problem got me in the past, and you should know that relying on
$^X can potentially be problematic in environnement where perl is
built in another executable; for example, mod_perl. In that case, $^X
would point to something like /usr/sbin/httpd, wich once used
might not yield the expected results...
Apparently, before this problem was fixed (pre perl-5.8.0), the only
'reliable' place to find the path to the perl interpreter is to look at
$Config{'startperl'}
Just a thought.
> The following patch implements this.
>
>
> --- Inline-0.43/C/C.pm.orig Sun Jul 22 17:09:35 2001
> +++ Inline-0.43/C/C.pm Wed Dec 12 11:01:46 2001
> @@ -656,6 +656,7 @@
> @{$o->{API}}{qw(module modpname modfname build_dir install_lib)};
>
> -f ($perl = $Config::Config{perlpath})
> + or -f ($perl = $^X)
> or croak "Can't locate your perl binary";
> $make = $o->{ILSM}{MAKE} || $Config::Config{make}
> or croak "Can't locate your make binary";
> --- Inline-0.43/Inline.pm.orig Sun Jul 22 10:00:24 2001
> +++ Inline-0.43/Inline.pm Wed Dec 12 11:02:38 2001
> @@ -660,6 +660,7 @@
> if (defined $o) {
> ($dir) = $dir =~ /(.*)/s if UNTAINT;
> my $perl = $Config{perlpath};
> + $perl = $^X unless -f $perl;
> ($perl) = $perl =~ /(.*)/s if UNTAINT;
> local $ENV{PERL5LIB} if defined $ENV{PERL5LIB};
> local $ENV{PERL5OPT} if defined $ENV{PERL5OPT};
--
+----------------------------------------------------+
| Philippe M. Chiasson <[EMAIL PROTECTED]> |
+----------------------------------------------------+
| F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3 A5A5 |
+----------------------------------------------------+
gethostent not implemented : Your C library apparently
doesn't implement gethostent(), probably because if it did,
it'd feel morally obligated to return every hostname on the
Internet.
-- perldiag(1)
perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl
Hacker!\n$/&&print||$$++&&redo}'
msg00852/pgp00000.pgp
Description: PGP signature
