in reply to Re^4: "our" versus "my" for class data
in thread "our" versus "my" for class data

A closure closes over the current lexical environment. That does not mean that the current lexical environment is private, whatever else shares it can change it.

When I said a closure "protect[s] it from the outside," I meant from outside the lexical scope that was closed around. I probably should have spelled this out more explicitly, as you have.

In the case of our, the current lexical environment includes the fact that certain variables are actually the equivalent package variable.

Ah, yes. Thanks for the clarification on this. So the closure does not contain the variable per se, but just the alias to it that our created.