Skip Menu |

This queue is for tickets about the Encode-JIS2K CPAN distribution.

Report information
The Basics
Id: 67531
Status: resolved
Priority: 0/
Queue: Encode-JIS2K

People
Owner: Nobody in particular
Requestors: d.thomas [...] its.uq.edu.au
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: installation depends on $ENV{PATH}
RHEL6.0 perl-5.10.1 which is totally separate to system perl # perl Makefile.PL fails enc2xs not found! at Makefile.PL line 28 # which enc2xs which: no enc2xs in (/opt/sbin:/opt/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin) PATHLOOP: for my $d (split /:/, $ENV{PATH}){ for my $f (qw/enc2xs enc2xs5.7.3/){ my $path = File::Spec->catfile($d, $f); -x $path and $enc2xs = $path and last PATHLOOP; } } $enc2xs or die "enc2xs not found!"; So I think the problem happens because it does not look into the bin sub-directory of the perl it's being installed into. Patch looks in the bin sub-directory of the perl this module is being installed into.
Subject: Encode-JIS2K-0.02.tar.gz.diff
diff -u Encode-JIS2K-0.02.orig/Makefile.PL Encode-JIS2K-0.02/Makefile.PL --- Encode-JIS2K-0.02.orig/Makefile.PL 2005-05-12 17:03:29.000000000 +1000 +++ Encode-JIS2K-0.02/Makefile.PL 2011-04-17 16:12:54.000000000 +1000 @@ -17,14 +17,21 @@ ); -my ($enc2xs, $encode_h) = (); -PATHLOOP: -for my $d (split /:/, $ENV{PATH}){ - for my $f (qw/enc2xs enc2xs5.7.3/){ - my $path = File::Spec->catfile($d, $f); - -x $path and $enc2xs = $path and last PATHLOOP; - } +# from perlvar +use Config; # first appeared in 5.00307 +my $secure_perl_path = $Config{perlpath}; +if ($^O ne 'VMS') { + my $secure_perl_path .= $Config{_exe} + unless $secure_perl_path =~ m/$Config{_exe}$/i; } +die "can't determine path to the perl I'm running under" + unless ($secure_perl_path); +use File::Basename qw(dirname); +my $dpath = dirname $secure_perl_path; +my ($enc2xs, $encode_h) = (); +my $enc2xs_fpath = File::Spec->catfile($dpath, 'enc2xs'); +$enc2xs = $enc2xs_fpath + if (-x $enc2xs_fpath); $enc2xs or die "enc2xs not found!"; print "enc2xs is $enc2xs\n"; my %encode_h = ();
Thank you. fixed in: https://github.com/dankogai/p5-encode-jis2k/commit/4ba0f153580e4468342bcd3af597cd0e48ea17bd Dan the Maintainer On Sun Apr 17 02:23:49 2011, d.thomas@its.uq.edu.au wrote: Show quoted text
> RHEL6.0 perl-5.10.1 which is totally separate to system perl > > > # perl Makefile.PL fails > enc2xs not found! at Makefile.PL line 28 > > > # which enc2xs > which: no enc2xs in > (/opt/sbin:/opt/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin) > > > PATHLOOP: > for my $d (split /:/, $ENV{PATH}){ > for my $f (qw/enc2xs enc2xs5.7.3/){ > my $path = File::Spec->catfile($d, $f); > -x $path and $enc2xs = $path and last PATHLOOP; > } > } > $enc2xs or die "enc2xs not found!"; > > So I think the problem happens because it does not look > into the bin sub-directory of the perl it's being installed into. > > Patch looks in the bin sub-directory of the perl this module > is being installed into.