[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Re: On Pseudohashes
Tim writes:
> What's needed, if you don't want to pre-declare all the methods, is
> some way for autoload to say it 'failed'. I see it in the Todo-5.005
> file as "_AUTOLOAD prodding" (in perl5.005_63).
In fact, this capacity is useful (some might say "essential") for *all*
dynamically dispatched functions, not just those named AUTOLOAD. One ought
to be able to write:
sub B::m
{
my ($self) = @_;
if (some_condition())
{
return $self->NEXT::m();
}
}
where NEXT is analogous to SUPER, but resumes the current dispatch
search, rather than initiating a new dispatch.
BTW, the next version of Class::Multimethods will provide this type of
redispatch.
Damian
- References to:
-
Tim Bunce <Tim.Bunce@ig.co.uk>
Tom Christiansen <tchrist@chthon.perl.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]