Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Access functions by name

by grep (Monsignor)
on Jun 15, 2009 at 20:38 UTC ( #771795=note: print w/replies, xml ) Need Help??


in reply to Access functions by name

Create a real object and then you call your methods by the method name stored in the DB;
# This is a code fragment and assumes a DBI statement handle $sth # that retrieves the appropriate records my $fs = FunctionSet->new(); while ( my $row = $sth->fetchrow_hashref ) { my $method_name = $row{method_name}; my $arg = $row{arg}; $fs->$method_name($arg); }
grep
One dead unjugged rabbit fish later...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://771795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2016-09-29 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (553 votes). Check out past polls.