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...


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 contemplating the Monastery: (12)
As of 2014-07-14 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (257 votes), past polls