We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Note that It can't safely be optimised that way at compile-time. Consider
If @a or one of its elements is magical, if an element of @a overloads =, or if the REFCNT of @a or one of its elements is greater than one, then the optimisation can't be applied. So if f's first argument is true, then the optimisation can't be applied. If g saved the reference to @a, then the optimisation can't be applied. etc. We're talking about a massive amount of resources to avoid a rare annoyance. Make a perlcritic rule instead. In reply to Re: Why doesn't perl optimize this?
by ikegami
|
|