Welcome to the Monastery | |
PerlMonks |
Access functions by nameby shmf (Novice) |
on Jun 15, 2009 at 20:01 UTC ( [id://771785]=perlquestion: print w/replies, xml ) | Need Help?? |
shmf has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I need to create a program, configure its behavior and than save its state into a database. To do that, I have a library (.pm) with some functions, and I want to save into the database the name of the functions that shall be called when I run my program the next time. Can I save the name of the functions into the database and then, (on load) call the correspondent function using its name? For example: Considering that I have the following librabry (FunctionsSet.pm): (...) @EXPORT = qw( funtion1 function2 function3 funtion4) (...) and that I read from D.B. fhis two strings: 'funtion1' and 'funtion4', how can I execute function1 and function4 from FunctionsSet.pm? Thanks in advance
Back to
Seekers of Perl Wisdom
|
|