From: Jarkko Hietaniemi Date: Tue, 19 Aug 2003 03:10:57 +0000 (+0000) Subject: Pod tweaks for NEXT from Alan Ferrency. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e23eab12291345ee6d531ea992930dc71f52fcab;p=p5sagit%2Fp5-mst-13.2.git Pod tweaks for NEXT from Alan Ferrency. p4raw-id: //depot/perl@20765 --- diff --git a/lib/NEXT.pm b/lib/NEXT.pm index 5738f5c..64610fe 100644 --- a/lib/NEXT.pm +++ b/lib/NEXT.pm @@ -201,18 +201,18 @@ NEXT.pm - Provide a pseudo-class NEXT (et al) that allows method redispatch =head1 DESCRIPTION NEXT.pm adds a pseudoclass named C to any program -that uses it. If a method C calls C<$self->NEXT::m()>, the call to +that uses it. If a method C calls C<$self-ENEXT::m()>, the call to C is redispatched as if the calling method had not originally been found. -In other words, a call to C<$self->NEXT::m()> resumes the depth-first, +In other words, a call to C<$self-ENEXT::m()> resumes the depth-first, left-to-right search of C<$self>'s class hierarchy that resulted in the original call to C. -Note that this is not the same thing as C<$self->SUPER::m()>, which +Note that this is not the same thing as C<$self-ESUPER::m()>, which begins a new dispatch that is restricted to searching the ancestors -of the current class. C<$self->NEXT::m()> can backtrack +of the current class. C<$self-ENEXT::m()> can backtrack past the current class -- to look for a suitable method in other -ancestors of C<$self> -- whereas C<$self->SUPER::m()> cannot. +ancestors of C<$self> -- whereas C<$self-ESUPER::m()> cannot. A typical use would be in the destructors of a class hierarchy, as illustrated in the synopsis above. Each class in the hierarchy