Manual Reference Pages - B::C (3)

CONTENTS

This compiler backend takes Perl source and generates C source code
corresponding to the internal structures that perl uses to run
your program. When the generated C source is compiled and run, it
cuts out the time which perl would have taken to load and parse
your program into its internal semi-compiled form. That means that
compiling with this backend will not help improve the runtime
execution speed of your program but may improve the start-up time.
Depending on the environment in which your program runs this may be
either a help or a hindrance.

Prepare to compile a module with all dependent code to a single shared
library rather than to standalone program.

Currently this just means that the code for initialising main_start,
main_root and curpad are omitted.
The .pm stub to bootstrap the shared lib is not generated.
This option should be used via perlcc -m.

This allows programs to use eval foo() even when sub foo is never
seen to be used at compile time. The down side is that any subs which
really are never used also have code generated. This option is
necessary, for example, if you have a signal handler foo which you
initialise with $SIG{BAR} = "foo". A better fix, though, is just
to change it to $SIG{BAR} = \&foo. You can have multiple <B>-uB>
options. The compiler tries to figure out which packages may possibly
have subs in which need compiling but the current version doesnt do
it very well. In particular, it is confused by nested packages (i.e.
of the form A::B) where package A does not contain any subs.

Even more faster pre-initialization of AVs with <B>B>independent_comalloc()<B>B> if supported.
Excludes -fav_initif so; uses -fav_initifindependent_comalloc() is not supported.

independent_comalloc() is recommended from <B>ptmalloc3B>, but also included in
ptmalloc, dlmalloc and nedmalloc.
Download ptmalloc3 here: <http://www.malloc.de/en/>
Note: independent_comalloc() is not included in google-perftoolstcmalloc.

-fno-walkall uses the simple old algorithm to detect which packages
needs to be stored.
-fwalkall was introduced to catch previously uncompiled packages for
computed methods or undetected deeper run-time dependencies.

Do not delete compiler-internal and dependent packages which appear to be
nowhere used automatically. This might miss run-time called stringified methods.
See B::C::Flags for @deps which packages are affected.

With 5.6 it is not possible to use the __DATA__ filehandle, because
compatible access via PerlIO::scalar was added with 5.8.1

It is generally not possible to restore all of the compiled BEGIN-time state.
Esp. problematic are non-standard filehandles (i.e. fd>2), process ids,
environment specific knowledge, because only with the compiler BEGIN blocks
are not executed in the client environment.

[perl #100138] DynaLoader symbols were XS_INTERNAL. Strict linking
could not resolve it. Usually libperl was patched to overcome this
for these two versions.
Setting the environment variable NO_DL_WARN=1 omits this warning.

perlcompiler for a general overview,
B::CC for the optimising C compiler,
B::Bytecode + ByteLoader for the bytecode compiler,
Od for source level debugging in the B::Debugger,
illguts for the illustrated Perl guts,
perloptree for the Perl optree.