in reply to Re: How to call AUTOLOAD before @ISA?
in thread How to call AUTOLOAD before @ISA?
The thing is that the check and the "do something" are all the same, but this applies to several methods, that's why I wanted to use AUTOLOAD.sub AUTOLOAD { my $self=shift; my $method=$AUTOLOAD; $method=~s/^.*:://; if (certain conditions are met) { do something } else { $self->SUPER::$method(@_); } }
I'm also pretty sure that this cannot be done (all the documentation seems to indicate so) and I have already solved my problem by dynamically defining the necessary subroutines in B's BEGIN block, but I will be glad to hear any other ideas.
Thanks,
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Re: How to call AUTOLOAD before @ISA?
by chromatic (Archbishop) on May 10, 2000 at 18:33 UTC | |
|
RE: RE: Re: How to call AUTOLOAD before @ISA?
by perlmonkey (Hermit) on May 10, 2000 at 05:45 UTC |