The -P command-line switch was deprecated in perl version 5.10.0 and removed as of version 5.12.0 (see perl5120delta). But the equivalent behaviour is provided by the module Filter::cpp:
#! perl use strict; use warnings; use Filter::cpp; #define DEBUG #define XYZ 42 #ifdef DEBUG print "Debugging enabled\n"; #else print "Debugging disabled\n"; #endif print XYZ . "\n";
Output:
13:14 >perl 772_SoPW.pl Debugging enabled 42 13:14 >
See perlfilter.
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^3: To DEBUG, or to COMMENT. _That_ is the question
by Athanasius
in thread To DEBUG, or to COMMENT. _That_ is the question
by taint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |