| ppp Perl Preprocessor | |||||||
|
|
|||||||
pppppp is yet another preprocessor for Perl, written in Perl. So why use it? Because it offers one feature that makes all the difference: Like all preprocessors, it provides the effects of conditional compilation, but it does so offline. Under normal usage, the code runs without the preprocessor. The preprocessor need only run when one of the conditional compilation variables changes. ppp provides the functionality of conditional compilation in-place. That is, the .pl file is directly modified, but no information is discarded. Instead, both sides of all #ifdefs remain in the run-time code, but with their 'inactive' sides commented out. For example:
#ifdef FOO The 'false' side code and the #ifdef structure are seen as comments, and thus ignored by the perl compiler. If the value of 'FOO' changed in the above example, say from 'true' to 'false', then when the ppp preprocessor is rerun, the code becomes:
#ifdef FOO The code is still all there. Nothing is lost, and any #ifdef can have its sense reversed at any time. Only when the value of the control variables of #ifdefs change is it necessary to re-run the preprocessor, and then only once. So the semantics of conditional compilation are achieved statically. And thus one can have the effects of conditional compilation without the run-time overhead. For Perl scripts, this is a big win. We may modify those scripts all we want, and do not have to run the preprocessor on each modification, nor on each time the script is run.
Main Features
Supported preprocessor constructsppp supports the following standard preprocessor features:
Extended preprocessor constructs:ppp also adds the following extensions:
InstallationThe ppp preprocessor runs as a standalone script, and does not require perl to installed anywhere, and does not require any modules other than the perl.exe executable and its .dll. Last Updated: 4/2/12 |
|||||||
|
Home | Designs | Machining | School | Downloads | Galleries | Contact Us
|