X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlbot.pod;h=72c18703b43e1f611d6e6cef95262445b0441b6a;hb=b59e3c8c16148102abaa610a4415d82ccf3208b7;hp=de2207a9617acca9699f88f7250727e6288f908d;hpb=c296029969658ed2c8d9a223d4b09026463ca970;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlbot.pod b/pod/perlbot.pod index de2207a..72c1870 100644 --- a/pod/perlbot.pod +++ b/pod/perlbot.pod @@ -2,7 +2,7 @@ perlbot - Bag'o Object Tricks (the BOT) -=head1 INTRODUCTION +=head1 DESCRIPTION The following collection of tricks and hints is intended to whet curious appetites about such things as the use of instance variables and the @@ -199,11 +199,10 @@ relationships between objects. =head1 OVERRIDING SUPERCLASS METHODS -The following example demonstrates how one might override a superclass -method and then call the method after it has been overridden. The -Foo::Inherit class allows the programmer to call an overridden superclass -method without actually knowing where that method is defined. - +The following example demonstrates how to override a superclass method and +then call the overridden method. The B pseudo-class allows the +programmer to call an overridden superclass method without actually knowing +where that method is defined. package Buz; sub goo { print "here's the goo\n" } @@ -216,7 +215,6 @@ method without actually knowing where that method is defined. package Foo; @ISA = qw( Bar Baz ); - @Foo::Inherit::ISA = @ISA; # Access to overridden methods. sub new { my $type = shift; @@ -225,15 +223,15 @@ method without actually knowing where that method is defined. sub grr { print "grumble\n" } sub goo { my $self = shift; - $self->Foo::Inherit::goo(); + $self->SUPER::goo(); } sub mumble { my $self = shift; - $self->Foo::Inherit::mumble(); + $self->SUPER::mumble(); } sub google { my $self = shift; - $self->Foo::Inherit::google(); + $self->SUPER::google(); } package main;