#!perl use strict; package Foo; sub Baz { my $self = shift; print "In Foo->Baz\n"; } sub Quux { my $self = shift; print "In Foo->Quux\n"; } package Bar; use vars qw/@ISA/; @ISA = qw(Foo); sub new { my $class = shift; return bless {}, $class; } sub Baz { my $self = shift; print "In Bar->Baz\n"; $self->SUPER::Baz; } package main; my $snafu = Bar->new; $snafu->Baz; $snafu->Quux; __END__ In Bar->Baz In Foo->Baz In Foo->Quux
Update:added Foo->Quux
In reply to Re: Recursion up The Inheritance Chain
by keszler
in thread Recursion up The Inheritance Chain
by rwadkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |