in reply to C pre-processor
In particular, it can remove execution paths which will never be reached:
If you use a constant for DEBUG and set it to 0, I'm 99.8% convinced Perl will do the right thing and not even compile the debugging code.chromatic$ perl -MO=Deparse print "hi"; if (0) { print "hi" } - syntax OK print 'hi!'; '???';
Update: I just ran a test with a real Perl package, and it works. You might want to put your constant declaration in a BEGIN{} block, just to be on the safe side.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: C pre-processor
by tilly (Archbishop) on May 01, 2001 at 23:31 UTC |