This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix perlobj SUPER example [perl #113972]
authorJesse Luehrs <doy@tozt.net>
Wed, 4 Jul 2012 01:28:24 +0000 (20:28 -0500)
committerJesse Luehrs <doy@tozt.net>
Wed, 4 Jul 2012 01:28:46 +0000 (20:28 -0500)
pod/perlobj.pod

index 015b1c9..bb0538a 100644 (file)
@@ -325,14 +325,12 @@ methods.
   sub speak {
       my $self = shift;
 
-      $self->SUPER::speak();
-
       say 'A';
   }
 
   package B;
 
-  use parent 'A';
+  use parent -norequire, 'A';
 
   sub speak {
       my $self = shift;
@@ -344,7 +342,7 @@ methods.
 
   package C;
 
-  use parent 'B';
+  use parent -norequire, 'B';
 
   sub speak {
       my $self = shift;