Ugh. You need to escape the sigil in $self. I'd rather use a closure to prevent me from having to be so clever:
for my $method ( qw/ TIEHASH STORE FETCH FIRSTKEY NEXTKEY EXISTS CLEAR DELETE UNTIE DESTROY / ) { no strict 'refs'; my $super = 'SUPER::' . $method; *{ $method } = sub { my $self = shift; notify( $method ); $self->$super( @_ ); }; }
That's also untested. Mixing SUPER and autogenerated methods makes it a little knotty.
In reply to Re: Re: tying hashes and SUPER
by chromatic
in thread tying hashes and SUPER
by particle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |