I was going to tell you why it's not a closure, but fortunately I checked first, and of course, you are right.
I doubt your central assertion that this sort of thing happens all the time though. How many times do you see named subroutines declared inside loops? Almost never. And I have never heard of anyone accidentally creating a closure.
Personally, I find using closures a liberating experience, and since they make some hard things easy, actually reduce bugs. | [reply] |
| [reply] |
| [reply] |
Well, now I understand the mechanics behind it becoming a closure, but why on earth would perl make it a closure? That doesn't make any sense to me. Why wouldn't the sub just use whatever $q it can find in the closest scope to it?
| [reply] |