Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How do you load configuration variables

by l2kashe (Deacon)
on Jul 14, 2003 at 04:00 UTC ( [id://273871]=note: print w/replies, xml ) Need Help??


in reply to How do you load configuration variables

Personally I have become a big fan of config::general. Its pretty trim, provides methods for updating the data file on the fly, should be as portable as perl ( im guessing here. ).
use Config::General; my $cfg_file = '/path/to/some/file'; my $cfg_obj = Config::General->new($cfg_file); my $href_config = $cfg_obj->get_all();
You could even set up a signal handler for catching say sig USR1 or USR2. 1 for dumping the current config from memory to the filesystem, and the other for reloading the config from the filesystem.

Regards

MMMMM... Chocolaty Perl Goodness.....

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found