dash2 has asked for the wisdom of the Perl Monks concerning the following question:
#perl package Foo; sub foo{print "got here";print $x++;print "\n";my $s=shif +t;die if $x>10;$s->SUPER::foo;} package Bar;@ISA=qw/Foo/; package Baz;@ISA=qw/Bar/; package main; my $f=bless {},Baz;$f->foo; # now hit Ctrl+D ... got here0 Can't locate object method "foo" via package "Foo" (perhaps you forgot + to load "Foo"?) at - line 2. #
Is this a bug? Why can't Foo::foo() call itself?
dave hj~
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: inheritance weirdness
by ihb (Deacon) on Jan 25, 2003 at 13:29 UTC | |
|
Re: inheritance weirdness
by boo_radley (Parson) on Jan 25, 2003 at 13:40 UTC | |
|
Re: inheritance weirdness
by dash2 (Hermit) on Jan 25, 2003 at 13:26 UTC | |
by merlyn (Sage) on Jan 25, 2003 at 16:59 UTC | |
by dash2 (Hermit) on Jan 27, 2003 at 12:36 UTC | |
by adrianh (Chancellor) on Jan 25, 2003 at 14:20 UTC |