http://www.perlmonks.org?node_id=348208


in reply to Re: May Thy Closures Be Blessed
in thread May Thy Closures Be Blessed

Why did you make 'class' a member variable in $fields{'class'}?

I belive my orginal reasoning had to do with an earlier version of the code that couldn't get access to $class. So my only excuse is hysterical reasons that I should have removed in the final post.

. . . violating the sort of encapsulation you just proposed here. Nothing is absolute.

I know it's possible to dig into someone else's lexical scope, but it's far more difficult than doing $obj->{foo}. Ultimately, I can't do anything to stop someone from tralling through /dev/mem or the equivilent on another system.

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated