Perl: the Markov chain saw | |
PerlMonks |
Re: using constants to trigger debug codeby Belgarion (Chaplain) |
on Jun 04, 2004 at 19:43 UTC ( [id://361172]=note: print w/replies, xml ) | Need Help?? |
If the compiler can determine at compile time that an expression will never be evaluated, it will remove the code. For example:
looks like this to the Perl compiler:
The two .. if 0; lines are turned into void strings which take basically no time to evaluate.
In Section
Seekers of Perl Wisdom
|
|