Front page | perl.perl5.porters |
Postings from January 2000
Re: On Pseudohashes
From:
Damian Conway
Date:
January 18, 2000 12:31
Subject:
Re: On Pseudohashes
Message ID:
200001182031.HAA00317@indy05.csse.monash.edu.au
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