perl - perlbrew fails with "Can't locate Devel/PatchPerl.pm" -


perlbrew fails can't locate devel/patchperl.pm.

more precisely, fails run of patchperl spawned off perlbrew.

there is in fact devel/patchperl.pm accessible via paths in environment variable perl5lib, perlbrew unconditionally deletes variable before runs perlpatch:

delete $env{$_} qw(perl5lib perl5opt); 

i can't find in perlbrew documentation justifying maneuver.

can explain why perlbrew this?

edit:

below bash script reproduces problem. run (with suitable <path_to_script>):

% env -i home=$home shell=/bin/bash /bin/bash --noprofile --norc bash-3.2$ /bin/bash --norc --noprofile <path_to_script> 

the script's running time 4 minutes on machine. last few lines of output, including lines showing error below:

(cd /tmp/perlbrew_root/build/perl-5.16.3 && rm -f config.sh policy.sh && patchperl && sh configure -de '-dprefix=/tmp/perlbrew_root/perls/perl-5.16.3' '-a'eval:scriptdir=/tmp/perlbrew_root/perls/perl-5.16.3/bin'' && make  && make test_harness && make install) 2>&1 | tee /tmp/perlbrew_root/build.perl-5.16.3.log can't locate devel/patchperl.pm in @inc (@inc contains: /library/perl/5.12/darwin-thread-multi-2level /library/perl/5.12 /network/library/perl/5.12/darwin-thread-multi-2level /network/library/perl/5.12 /library/perl/updates/5.12.3 /system/library/perl/5.12/darwin-thread-multi-2level /system/library/perl/5.12 /system/library/perl/extras/5.12/darwin-thread-multi-2level /system/library/perl/extras/5.12 .) @ /tmp/testperl/bin/patchperl line 12. begin failed--compilation aborted @ /tmp/testperl/bin/patchperl line 12. perl-5.16.3 installed. 

the last line of output above (perl-5.16.3 installed.) nonsense: real build , installation of perl-5.16.3 take 1 order of magnitude longer script's running time, which, stated, 4 minutes on machine.

note @inc in error. don't see how patchperl possibly find devel/patchperl.pm, under /tmp/testperl/lib/perl5, given @inc.

perldir=/tmp/testperl /bin/rm -rf "$perldir"  /bin/rm -rf /tmp/build /bin/mkdir -p /tmp/build cd /tmp/build  /usr/bin/curl -s http://www.cpan.org/authors/id/a/ap/apeiron/local-lib-1.008009.tar.gz | tar xzf -  pushd local-lib-1.008009   /usr/bin/perl makefile.pl "--bootstrap=$perldir"   /usr/bin/make install popd  eval "$( /usr/bin/perl -i$perldir/lib/perl5 -mlocal::lib=$perldir )"  /usr/bin/cpan app::cpanminus  export perlbrew_root=/tmp/perlbrew_root export perlbrew_home=/tmp/perlbrew_home /bin/rm -rf "$perlbrew_root" "$perlbrew_home"  $perldir/bin/cpanm app::perlbrew $perldir/bin/perlbrew init source "$perlbrew_root/etc/bashrc"  $perldir/bin/perlbrew install -v perl-5.16.3 

upgrade perlbrew (perlbrew self-upgrade or shell bootstrap incantation http://perlbrew.pl/).

recent versions install patchperl $perlbrew_root/bin through perlbrew install-patchperl.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -