PApp::PCode - PCode compiler/decompiler and various other utility functions.
PApp stores a lot of things in pcode format, which is simply an escaping mechanism to store pxml/xml/html/pelr sections inside a single data structure that can be efficiently converted to pxml or perl code.
You will rarely if ever need to use this module directly.
The following four mode-switches are allowed, the initial mode is ``:>'' (i.e. non-interpolated html/xml). You can force the initial mode to ``:>'' by prefixing the string with ``<:?>''.
<: start verbatim perl section ("perl-mode") :> start plain string section (non-interpolated string) <? start perl expression (single expr, result will be interpolated) ?> start interpolated string section (similar to qq[...]>) DEPRECATED will soon mean the same as :>
Within plain and interpolated string sections you can also use the __``string'' construct to mark (and map) internationalized text. The construct must be used verbatim: two underlines, one double-quote, text, and a trailing double-quote. For more complex uses, just escape to perl (e.g. <?__``xxx''?>).
In string sections (and only there!), you can also use preprocessor
# must be at the beginning of the line, between the
and the command name can be any amount of white space, just like in C!)
#if any_perl_condition any phtml code #elsif any_perl_conditon ... #else ... #endif
Preprocessor-commands are ignored at the very beginning of a string section (that is, they must follow a linebreak). They are completely removed on output (i.e. the linebreak before and after it will not be reflected in the output).
White space will be mostly preserved (especially line-number and -ordering).
the PApp manpage.
Marc Lehmann <firstname.lastname@example.org> http://www.goof.com/pcg/marc/