in reply to Re: Calling OO-method From A Hash
in thread Calling OO-method From A Hash
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Calling OO-method From A Hash
by tinita (Parson) on Mar 03, 2004 at 09:56 UTC | |
| |
|
Re^3: Calling OO-method From A Hash
by Anonymous Monk on Mar 03, 2004 at 03:06 UTC | |
by Fletch (Bishop) on Mar 03, 2004 at 03:11 UTC | |
by Anonymous Monk on Mar 03, 2004 at 03:14 UTC |