M
Matthew Braid
Hi all,
Just a quick question - I just found out that this:
package Bar;
sub woo { print "WOO!\n" }
package Foo;
use base qw/Bar/;
sub woo {
my $class = shift;
$class::SUPER->woo(); # EEK!
print "WOO2!\n";
}
package main;
Foo->woo();
1;
__END__
does not work - the line marked with # EEK! causes perl to die with the message
'Can't call method "woo" on an undefined value at ....'.
I take it that you can't find a _class_'s super class via the ::SUPER construct
(it obviously works for an instance of the class).
Is there something else I can do to accomplish this?
MB
Just a quick question - I just found out that this:
package Bar;
sub woo { print "WOO!\n" }
package Foo;
use base qw/Bar/;
sub woo {
my $class = shift;
$class::SUPER->woo(); # EEK!
print "WOO2!\n";
}
package main;
Foo->woo();
1;
__END__
does not work - the line marked with # EEK! causes perl to die with the message
'Can't call method "woo" on an undefined value at ....'.
I take it that you can't find a _class_'s super class via the ::SUPER construct
(it obviously works for an instance of the class).
Is there something else I can do to accomplish this?
MB