in reply to goto and AUTOLOADed methods
sub AUTOLOAD { my $self = $_[0]; my $method = $self->something_clever_returning_method_ref(); # or my $method = something_clever_returning_method_ref($self); # or whatever goto &$method; }
Update: Change "shift" to $_[0].
Also add recommendation here: something_clever_returning_method_ref() should instantiate the method as a sub so that next time it gets called directly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: goto and AUTOLOADed methods
by fergal (Chaplain) on Aug 01, 2003 at 11:20 UTC | |
by ctilmes (Vicar) on Aug 01, 2003 at 11:35 UTC | |
|
Re: Re: goto and AUTOLOADed methods
by nite_man (Deacon) on Aug 01, 2003 at 11:19 UTC | |
by fergal (Chaplain) on Aug 01, 2003 at 11:26 UTC | |
|
Re: Re: goto and AUTOLOADed methods
by fergal (Chaplain) on Aug 01, 2003 at 11:54 UTC |