Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 scrutinizing the Monastery: (9)
As of 2014-12-21 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (109 votes), past polls