in reply to Perl bytecode on unix

fpi, to answer your first question.. you can use: Which it seems like you're familiar with both of these ways...

From the looks of the second question, you're using ByteLoader correctly. Remember that it's still in experimental phase.. which would explain why it's a bit unstable. I believe there is an updated version coming out.

I believe you need to do a full compile(perlcc) to include other scripts that you used in your main script. If you run perlcc with the -b flag, it will generate bytecode instead of C code.. i.e. perlcc -b helloworld.pl

Here are a few good links:

Replies are listed 'Best First'.
Re: Perl bytecode on unix
by fpi (Monk) on Mar 16, 2001 at 23:47 UTC
    LD2, thanks for the post. After reading through the links you posted and then further testing, here's the first little interesting thing I found:

    perl -MO=Bytecode,-omyfile.bc myfile.pl produces the bytecode file, as before

    perlcc -b -o myfile.bc myfile.pl produces the bytecode, and automatically sticks in the perl header and use Byteloader 0.03; statement. The only problem was the perl header pointed to /perl instead of /usr/bin/perl, so I had to go in and edit anyway. But at least now I know that I was using the ByteLoader module correctly, since that was the way that perlcc sets it up.

    Thanks for the filehandle links too. I'm trying to experiment with byteloader_fh() again, but I'm getting "Undefined subroutine B::byteload_fh" errors. I reloaded the B modules....I just found out that you can't reload the B modules without reloading all of perl....