in reply to The Dynamic Method Calls Strike Back
Otherwise, you could do something like:my $method = "do_something"; $object->$method if $object->can($method);
I would HIGHLY not reccommend turning off any part of strict unless you are a "Perl Jedi Master"(tm) and have many Dark Side points to your name.$object->"do_$something";
------
/me wants to be the brightest bulb in the chandelier!
Vote paco for President!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: The Dynamic Method Calls Strike Back
by bikeNomad (Priest) on Aug 28, 2001 at 03:03 UTC | |
Re: Re: The Dynamic Method Calls Strike Back
by runrig (Abbot) on Aug 28, 2001 at 02:23 UTC | |
Re: Re: The Dynamic Method Calls Strike Back
by frag (Hermit) on Aug 28, 2001 at 02:32 UTC | |
by runrig (Abbot) on Aug 28, 2001 at 02:36 UTC |