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

Re: Better way to read "configuration" files

by caedes (Pilgrim)
on Mar 04, 2003 at 00:01 UTC ( [id://240199]=note: print w/replies, xml ) Need Help??


in reply to Better way to read "configuration" files

If I'm feeling extra lazy I usually just 'require' some other file into the program. eg:
package MY::Conf; #No directories or URLs end in "/" our %var; ################################# $var{DATA_DIR} = "Zephir/data"; $var{CONF_DIR} = "Zephir/conf"; $var{AVATAR_DIR} = "images/buttons"; $var{AVATAR_URL} = "/images/buttons"; $var{TMPL_DIR} = "Zephir/tmpl"; $var{HOME_PAGE} = "http://asdf.net/"; $var{HOSTNAME} = "asdf.net"; 1;

-caedes

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-24 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found