rschupp / PAR-Packer

(perl) Generate stand-alone executables, perl scripts and PAR files https://metacpan.org/pod/PAR::Packer
Other
48 stars 13 forks source link

pp -u broken in perl 5.32 #27

Closed Lamprecht closed 4 years ago

Lamprecht commented 4 years ago

perl 5.32 removed utf8_heavy.pl in this commit which breaks pp -u. I added a testcase for the -u switch in a pull request #26. I don't know how to fix this. It seems to me, that -u could be made a no-op for new perls :

➜  pptest perlbrew switch perl-5.28.2
➜  pptest pp -e ' $s = "\x{263a}";$s =~ tr/\x{263a}/A/;binmode (STDOUT,":utf8"); print "$s\n";'
➜  pptest ./a.out                    
Can't locate utf8_heavy.pl in @INC (@INC contains: /tmp/par-6368726973/cache-6817150d1a78c179aed179e242eeea07095ab2a7/inc/lib /tmp/par-6368726973/cache-6817150d1a78c179aed179e242eeea07095ab2a7/inc CODE(0x555817028ae8) CODE(0x55581703e120)) at /home/chris/perl5/perlbrew/perls/perl-5.28.2/lib/5.28.2/utf8.pm line 16.
➜  pptest pp -u -e ' $s = "\x{263a}";$s =~ tr/\x{263a}/A/;binmode (STDOUT,":utf8"); print "$s\n";'
➜  pptest ./a.out
A
➜  pptest perlbrew switch perl-5.32.0
➜  pptest pp -e ' $s = "\x{263a}";$s =~ tr/\x{263a}/A/;binmode (STDOUT,":utf8"); print "$s\n";'
➜  pptest ./a.out                    
A
➜  pptest pp -u -e ' $s = "\x{263a}";$s =~ tr/\x{263a}/A/;binmode (STDOUT,":utf8"); print "$s\n";'
/home/chris/perl5/perlbrew/perls/perl-5.32.0/bin/pp: Cannot find module utf8_heavy.pl (specified with -M)
rschupp commented 4 years ago

@Lamprecht Thanx for the report. pp will ignore "-u" for Perl ≥ 5.31.6