Oh ok, I can understand that. I've been writing code in a similar vein except mine steals lexical variables. If you want to steal variables out of a blessed something then what you originally wrote is perfectly fine - you might want to see about importing that thisone() method or name it something that indicates it's integrity violating nature. So what your call to Foobar::thisone($obj) is semantically equivalent to thisone($obj) except that one version leaves the method off in the original package. If you look at my signature you'll see an example of a something being violated in the exact same way. I leave the B::svref_2object method over there since I didn't feel like importing it into the current scope. At that point it becomes preference and style.
|