Perl B:Bytecode anyone ?

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 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top