First page Back Continue Last page Overview Graphics
Inheritance example
Package My::Ball::BasketBall;
@ISA=qw(My::Ball);
sub bounce {
print “I dribbled the ball.\n”;
}
sub shoot {
my $self=shift;
$self->SUPER::throw();
print “He shoots… He scores!!!\n”
}