dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
my $class = ref($self); foreach my $parent (@{"${class}::ISA"}) { my $value = $parent->do_something if $parent->can('do_something'); }
This is a class method, not an object method, so it takes a class-name as the first arg. From what I've read about can(), it only handles blessed references.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UNIVERSAL::can() doesn't do what I need ...
by Vynce (Friar) on Jun 14, 2001 at 18:18 UTC | |
by dragonchild (Archbishop) on Jun 14, 2001 at 18:29 UTC | |
|
Re: UNIVERSAL::can() doesn't do what I need ...
by lestrrat (Deacon) on Jun 14, 2001 at 18:09 UTC |