Of course the truly paranoid will make sure that it's a valid method first.
my $method = $q->param( 'method' ); # ... or whatever if( my $m = $obj->can( $method ) ) { $obj->$m( @params ); } else { die "I can't call $method on a ", ref $obj; }
In reply to Re: Re: Calling OO-method From A Hash
by Fletch
in thread Calling OO-method From A Hash
by dejoha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |