Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Using arbitrary packages

by Sprad (Hermit)
on Jul 12, 2004 at 22:14 UTC ( [id://373756]=note: print w/replies, xml ) Need Help??


in reply to Re: Using arbitrary packages
in thread Using arbitrary packages

In a nutshell, I'd like to have a config file that contains module names and function names. I want to read the config file, 'use' all the modules, and then make the function calls as given in the config file.

It's all trusted data, since it's all being run locally.

---
A fair fight is a sign of poor planning.

Replies are listed 'Best First'.
Re^3: Using arbitrary packages
by fergal (Chaplain) on Jul 12, 2004 at 22:43 UTC
    Perhaps you should use
    do $filename;
    and have actual real Perl in the file that looks like
    use Module1; use Module2; function1(); function2();
    it will run faster. No point in inventing your own mini perl parser. Especially if in the future you decide you need to start adding arguments to your functions etc.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-26 02:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found