diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-19 03:10:57 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-08-19 03:10:57 +0000 |
commit | e23eab12291345ee6d531ea992930dc71f52fcab (patch) | |
tree | 944b29d26eee595efd15a351c4f959b5bbc1b325 /lib/NEXT.pm | |
parent | 554ad1fcb1c9a72f13e2c15496f1fa2ad5b5e63c (diff) | |
download | perl-e23eab12291345ee6d531ea992930dc71f52fcab.tar.gz |
Pod tweaks for NEXT from Alan Ferrency.
p4raw-id: //depot/perl@20765
Diffstat (limited to 'lib/NEXT.pm')
-rw-r--r-- | lib/NEXT.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/NEXT.pm b/lib/NEXT.pm index 5738f5cfe2..64610fed27 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<NEXT> to any program -that uses it. If a method C<m> calls C<$self->NEXT::m()>, the call to +that uses it. If a method C<m> calls C<$self-E<gt>NEXT::m()>, the call to C<m> 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-E<gt>NEXT::m()> resumes the depth-first, left-to-right search of C<$self>'s class hierarchy that resulted in the original call to C<m>. -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-E<gt>SUPER::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-E<gt>NEXT::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-E<gt>SUPER::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 |