Open rurban opened 7 years ago
cperl5.27.1d-nt -S perlcc -B -e'use strict;
sub test
{
my $s=" ";
$s =~ s/ //g;
print "test $s \n";
}
test();' -o xx.plc && cperl5.27.1d-nt xx.plc
=>
Assertion failed: (isGV_with_GP(_gvflags)), function Perl_gv_check, file gv.c, line 2554
per email by George tt77ua
1) Simple code (works well if executed by usual perl direcly):
2 ) But after:
perl -MO=Bytecode,-H,-otest2 test.cgi ; ./test2
I have:Modification of a read-only value attempted at /usr/local/lib/perl5/site_perl/mach/5.20/FCGI.pm line 2. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/mach/5.20/FCGI.pm line 2. Compilation failed in require at test.cgi line 3. BEGIN failed--compilation aborted at ./test2 line 1360. Modification of a read-only value attempted at ./test2 line 1360.
3) At same time it will work with B::Bytecode if I will remove sub !!! Other good sample below (it work well):
Line 2 inside FCGI.pm is: use strict; What is wrong with simple variables/subroutines when using B::Bytecode ?