Scope of variables in a function
Yitzchak Scott-Thoennes
sthoenna at gmail.com
Sun Jun 2 06:19:11 BST 2013
On Sat, Jun 1, 2013 at 10:23 AM, Dirk Koopman <djk at tobit.co.uk> wrote:
> Quite a lot of other perl artefacts have been deprecated and then removed.
> Why does this one persist? In what way is it useful or intuitive?
Because it is the result of an optimization - lexicals are reset upon leaving
scope, not entering it, and only if the my() was reached during execution.
Nevertheless, I believe Dave Mitchell had a patch to fix it that never
quite made it in.
More information about the london.pm
mailing list