in reply to Re^2: Short invocation for per-object methods
in thread Short invocation for per-object methods
The way I did it I don't think the global scope of that global variable will ever contain an object, so I wasn't too worried about that part
You know, I think you're right about that, which makes me think this never would have worked anyway. The $self referred to by your debug method is the our $self, which never has anything in except in a local scope.
Using my obviously wouldn't work since debug wouldn't be able to get to it, and I think just omitting the local would cause re-entrancy issues. So local seemed like the only solution.
That's kind of what I was getting at: when local is the answer, it usually means you're asking the wrong question. It is very useful in a couple of specific cases though, so I can't say it shouldn't ever be used.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Short invocation for per-object methods
by ikegami (Patriarch) on Jan 04, 2007 at 16:37 UTC | |
by perrin (Chancellor) on Jan 04, 2007 at 16:47 UTC |