I think this is much clearer as:
if (my $sub_ref = ECHO_MODULE->can($subname) ) { $sub_ref->(); } ...
Be careful mixing up methods and functions.
In reply to Re^2: variable subroutine call
by chromatic
in thread variable subroutine call
by davg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |