fpi has asked for the wisdom of the Perl Monks concerning the following question:
1) How do I execute a perl file that I already converted to bytecode (perl -MO=Bytecode hello.pl)? Specifically, how do I use the byteload_fh () function mentioned in the docs? Even if you are not sure, I would appreciate a guess as to how to experiment, since I am not good with filehandles.
2)I found the ByteLoader.pm module, but I'm not sure if I'm using it correctly, and if I am, I can't get it to work all the time (even with a simple helloworld script, sometimes it works, sometimes not, beats me....). Basically I just open up the file containing the bytecode, add the following to the top of the file:
3) will converting to bytecode include the perl modules that I have "used" in my script? or does that only happen with a full C (perlcc) compile?
2)I found the ByteLoader.pm module, but I'm not sure if I'm using it correctly, and if I am, I can't get it to work all the time (even with a simple helloworld script, sometimes it works, sometimes not, beats me....). Basically I just open up the file containing the bytecode, add the following to the top of the file:
after which the bytecode follows. I would rather use byteload_fh() if I only knew how.#!/usr/bin/perl use ByteLoader 0.03;
3) will converting to bytecode include the perl modules that I have "used" in my script? or does that only happen with a full C (perlcc) compile?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl bytecode on unix
by LD2 (Curate) on Mar 16, 2001 at 16:23 UTC | |
by fpi (Monk) on Mar 16, 2001 at 23:47 UTC |
Back to
Seekers of Perl Wisdom