package My::Foo::Bar; use base 'Foo::Bar'; sub do_magic { my $self = shift; my $orig_ret = $self->SUPER::do_magic( @_ ); ### Do rest of magic here. return $actual_ret_value; }
Season accordingly if your magic needs to be done before the superclass' magic.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: The correct way to redefine a routine
by Fletch
in thread The correct way to redefine a routine
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |