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.

  • Comment on Re^10: Function name in a variable, can't recall the concept (introspection with ->can )
  • Select or Download Code

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
    it's getting more and more ridiculous, I'm out.

    edit

    I replied to

    1) What's wrong with that? 2) You're missing the point. It doesn't matter what the code is, since + it's needed no matter what.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Yes, so I've been saying. Ludicrous, ridiculous, insane. These are synonyms.