in reply to OOP - Constant Vs. Subroutine

From perldoc constant:
When a constant is used in an expression, perl replaces it with its value at compile time, and may then optimize the expression further. In particular, any code in an "if (CONSTANT)" block will be optimized away if the constant is false.
In other words, it's not a sub call any more.

Replies are listed 'Best First'.
Re^2: OOP - Constant Vs. Subroutine
by 2xlp (Sexton) on May 11, 2007 at 21:46 UTC
    ah, that makes perfect sense.