in reply to Sub getting it's own CODE ref? Proto-OO
I'm not sure I fully understand what you're doing here, but it may be possible to simplify the problem by modifying the dispatcher - something like (simplified):
sub dispatch { my($self, $code) = (shift, shift); push @{ $self->{running} }, $code; my $result = eval { &$code($self, @_) }; pop @{ $self->{running} }; die if $@; return $result; }
It gets slightly more complex when you properly allow for context using wantarray, but this will allow super() to inspect information in the object itself to determine whence it was called.
Hugo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sub getting it's own CODE ref? Proto-OO
by bsb (Priest) on Jun 17, 2004 at 01:16 UTC |