in reply to Re^9: Function name in a variable, can't recall the concept (introspection with ->can )
in thread Function name in a variable, can't recall the concept
You're missing the point. I'm not proposing a solution; I'm saying that yours is ludicrous. It makes absolutely no sense to use
my $sub = @{ get_array_by_name($pkg, 'ISA') } ? get_sub_by_name($pkg, $name) : $pkg->can($name);
instead of
my $sub = get_sub_by_name($pkg, $name);
The implementation of get_sub_by_name isn't relevant to that point.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Function name in a variable, can't recall the concept (introspection with ->can )
by LanX (Saint) on Apr 19, 2019 at 18:45 UTC | |
by ikegami (Patriarch) on Apr 19, 2019 at 18:47 UTC |