This is a bit ugly, but I'll post it anyway since no one has mentioned can().
Since you expect the method to exist, you can do
$obj->can('...')->($obj => @args)It works because can() returns a code reference to the subroutine it found (undef if none), and then you simply provide the object as the first argument.
ihb
In reply to Re: Double quoted string as method call
by ihb
in thread Double quoted string as method call
by ryantate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |