Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Using arbitrary packages

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 18: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.