http://www.perlmonks.org?node_id=615102


in reply to Re^2: OOP - Constant Vs. Subroutine ()
in thread OOP - Constant Vs. Subroutine

While I have no idea of Perl's internals, it also seems that it depends what the sub contains. Of course, this is logical, since you can't inline everything. Seems to be that things that can be reduced to constant values will be inlined, which also makes it easier to remember :) So, "4" will be inlined, "4+4" too, since it can also be optimized away. "@INC" won't, for example.


Ordinary morality is for ordinary people. -- Aleister Crowley