- or download this
package ModB;
use parent qw'ModA';
...
return $c->SUPER::new ( @_ ) ;
}
1;
- or download this
package ModA;
sub new { return bless {}, shift }
sub p { print @_ }
1;
- or download this
use ModB;
my $b = ModB->new();
$b -> p ( "World!" ) ;