A
Andrew Lambert
Hi,
I've been trying to compile perl scripts into bytecode. Now, from what I
understand I can use either perlcc -B script.pl or perl -MO=bytecode
script.pl to do this (whats the difference between these two methods anyway
?).
If I use perl -MO=bytecode, both versions I've tried dump seemingly random
ascii characters to the screen. ActivePerl-5.8 completes with 'script syntax
OK' while the standard redhat perl completes with 'No package specified for
compilation ...'. However, in either case, no output files are generated.
If I use perlcc -b, then activeperl-5.8 seems to complete OK, producing an
'a.out' file, while the redhat perl finishes with 'Can't call method "objix"
without a package or object reference at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/B/Bytecode.pm line 355'.
So, if running perlcc -b with activeperl-5.8 has actually worked, how do I
eventually run the a.out file ?
I realize that the bytecode compiler is supposed to be experimental but has
anyone had any success ?
I've been trying to compile perl scripts into bytecode. Now, from what I
understand I can use either perlcc -B script.pl or perl -MO=bytecode
script.pl to do this (whats the difference between these two methods anyway
?).
If I use perl -MO=bytecode, both versions I've tried dump seemingly random
ascii characters to the screen. ActivePerl-5.8 completes with 'script syntax
OK' while the standard redhat perl completes with 'No package specified for
compilation ...'. However, in either case, no output files are generated.
If I use perlcc -b, then activeperl-5.8 seems to complete OK, producing an
'a.out' file, while the redhat perl finishes with 'Can't call method "objix"
without a package or object reference at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/B/Bytecode.pm line 355'.
So, if running perlcc -b with activeperl-5.8 has actually worked, how do I
eventually run the a.out file ?
I realize that the bytecode compiler is supposed to be experimental but has
anyone had any success ?