in reply to Re: Dynamically wrapping ancestor method calls
in thread Dynamically wrapping ancestor method calls

You should probably try to figure out what to do with "implicitly defined" methods in your wrapper class, like can() and isa(). My skills don't allow me to either try to suggest something intelligent, or to assure that these two methods are the only ones that you get for free when you create a wrapper like this. Moreover, you should be sure that the already existing methods don't play with caller() (you could try to read Hook::LexWrap to figure out how to deal with this issue).

Update: from chromatic's answer, I assume that I actually got all the implicitly defined subs :)

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^3: Dynamically wrapping ancestor method calls
by chromatic (Archbishop) on Dec 11, 2006 at 19:36 UTC
    sub can { my $self = shift; ${ $self }->can( @_ ) } sub isa { my $self = shift; ${ $self }->isa( @_ ); }