If you'd used constant instead of doing it manually and were also using perl 5.10, you'd also avoid the memory overhead for the function DoesNotChange. Anyone doing sub BAR () { FOO } won't get the optimization.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^2: OOP - Constant Vs. Subroutine ()
by diotalevi
in thread OOP - Constant Vs. Subroutine
by 2xlp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |