in reply to Double quoted string as method call
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Double quoted string as method call
by EvilSuggestions (Acolyte) on May 05, 2004 at 19:53 UTC | |
by ihb (Deacon) on May 11, 2004 at 18:52 UTC |