so I guess I was a little closer to what I wanted than I thought!*Obj::myFunkyLogHandler = \$myFunkyLogHandler; *Obj::doSomething2 = \&Obj::doSomething; *Obj::doSomething = sub { $myFunkyLogHandler->Log("Hello there!"); my $ret_val = Obj::doSomething2( @_ ); $myFunkyLogHandler->Log("Bye for now!"); return $ret_val; };
In reply to Re^2: Hijacking a method
by Transient
in thread Hijacking a method
by Transient
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |