perlknight has asked for the wisdom of the Perl Monks concerning the following question:
andpackage Mule; our @ISA = qw(Horse Donkey); sub kick { my $self = shift; print "The mule kicks!\n"; $self->SUPER::kick(@_); }
But I need clearification on is "$self->Donkey::speak(@_)" and "shift->SUPER::divebomb(@_)". What is the diff btw "$self" and "shift" when used in this context? Thanks.package Bird; use Dragonfly; { package Dragonfly; sub divebomb { shift->SUPER::divebomb(@_) }$self->Donkey::speak(@_ +);" and "shift->SUPER::divebomb(@_);". }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question on use of Super with OO programing
by castaway (Parson) on Jan 19, 2003 at 17:32 UTC | |
|
Re: Question on use of Super with OO programing
by dws (Chancellor) on Jan 19, 2003 at 17:41 UTC | |
by djantzen (Priest) on Jan 19, 2003 at 18:34 UTC |