relative to the current package and not to the invoking object.
p4raw-id: //depot/perl@22036
}
So, C<SUPER::speak> means look in the current package's C<@ISA> for
-C<speak>, invoking the first one found.
+C<speak>, invoking the first one found. Note that it does I<not> look in
+the C<@ISA> of C<$class>.
=head2 Where we're at so far...
$foo->goo;
$foo->google;
+Note that C<SUPER> refers to the superclass of the current package
+(C<Foo>), not to the superclass of C<$self>.
+
=head1 USING RELATIONSHIP WITH SDBM
$self->SUPER::display("Name", @args);
}
+It is important to note that C<SUPER> refers to the superclass of the
+I<current package> and not to the superclass of the object. Also, the
+C<SUPER> pseudo-class can only currently be used as a modifier to a method
+name, but not in any of the other ways that class names are normally used,
+eg:
+
+ something->SUPER::method(...); # OK
+ SUPER::method(...); # WRONG
+ SUPER->method(...); # WRONG
+
Instead of a class name or an object reference, you can also use any
expression that returns either of those on the left side of the arrow.
So the following statement is valid:
This way it starts looking in my class's @ISA. This only makes sense
from I<within> a method call, though. Don't try to access anything
in SUPER:: from anywhere else, because it doesn't exist outside
-an overridden method call.
+an overridden method call. Note that C<SUPER> refers to the superclass of
+the current package, I<not> to the superclass of C<$self>.
Things are getting a bit complicated here. Have we done anything
we shouldn't? As before, one way to test whether we're designing