Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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...


Comment on Re: Access functions by name
Download Code

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: (7)
As of 2015-07-30 11:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls