develooper Front page | perl.perl5.porters | Postings from January 2000

Re: On Pseudohashes

Damian Conway
January 18, 2000 12:31
Re: On Pseudohashes
Message ID:
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 

Damian Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About