The easiest way is to do this:
$obj->$method(@args)
But you can also call the code reference you got back from ->can:
my $method = $obj->can($method_name); $method->( $obj, @args );
As $method is not bound to $obj, you have to supply $obj as the first parameter.
In reply to Re: Invoke a method on an object
by Corion
in thread Invoke a method on an object
by thedi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |