B::Bytecode3perl
Perl compiler's bytecode backend
Usage
perl -MO=Bytecode[,-H][,-oscript.plc] script.pl
Overview
Compiles a Perl script into a bytecode format that could be loaded later by the ByteLoader module and executed as a regular Perl script.
Examples
$ perl -MO=Bytecode,-H,-ohi -e 'print "hi!\n"'$ perl hihi!
Options
-
-b -
Save all the BEGIN blocks. Normally only BEGIN blocks that
"require"other files (ex."use Foo;") are saved.
-
-H -
prepend a
"use ByteLoader VERSION;"line to the produced bytecode.
-
-k -
keep the syntax tree - it is stripped by default.
-
-ooutfile -
put the bytecode in <outfile> instead of dumping it to STDOUT.
-
-s -
scan the script for
"# line .."directives and for <goto LABEL> expressions. When gotos are found keep the syntax tree.
Known bugs
•
|
|
|---|---|
•
|
|
•
|
variables in |
•
|
scripts that use source filters will fail miserably. |
Notice
There are also undocumented bugs and options.
THIS CODE IS HIGHLY EXPERIMENTAL. USE AT YOUR OWN RISK.
Releases
3 releases since Debian 3.0 (Woody); the text changed 2 times.
-H since Debian 3.1 (Sarge);
-b since Debian 3.1 (Sarge);
-k since Debian 3.1 (Sarge);
-o since Debian 3.1 (Sarge);
-s since Debian 3.1 (Sarge).
-- until Debian 3.0 (Woody);
-D until Debian 3.0 (Woody);
-DC until Debian 3.0 (Woody);
-Da until Debian 3.0 (Woody);
-Db until Debian 3.0 (Woody);
-Do until Debian 3.0 (Woody);
-On until Debian 3.0 (Woody);
-S until Debian 3.0 (Woody);
-afilename until Debian 3.0 (Woody);
-f until Debian 3.0 (Woody);
-fbypass-nullops until Debian 3.0 (Woody);
-fcompress-nullops until Debian 3.0 (Woody);
-fomit-sequence-numbers until Debian 3.0 (Woody);
-ofilename until Debian 3.0 (Woody);
-upackage until Debian 3.0 (Woody).