in reply to Re^2: Rules of Lexical Scoping
in thread Rules of Lexical Scoping

"3. At the creation time of a sub that references an outer lexical" as opposed to "3. At the creation time of a sub in scope of an outer lexical" is also an optimization that also has little user-visible effect.

ysth posted (in part) to explain the low-level details behind the sub { eval '$i' } problem.
I posted to explain the low-level details behind the my $i if $expr; problem.

I don't see my post as being out of place, although I'll grant you that my opening ("I think that's quite inaccurate.") could have been worded better.

Replies are listed 'Best First'.
Re^4: Rules of Lexical Scoping (inaccurate)
by tye (Sage) on Nov 12, 2007 at 05:40 UTC

    When I read "Each time a block with a 'my' declaration is entered, a new instance of that lexical is created", my first reaction was very much "I think that's quite inaccurate".

    I also quite disagree with the assertion that "it has no user-visible effects" and not just because you demonstrated some in your reply. The only reason I knew that the original description was inaccurate was because I had answered nodes from users who ran into things (which means they were user-visible) that, in order to explain, I had to make those specific effects more obviously visible.

    - tye        

      I am curious to know what those things were that users ran into, and if they are fixed in 5.10.0 (which definitely has some scoping fixes in it), if you have the time and energy to track down some of your answers.