I recently played around with a module Config::General. Very handy. 
Try that.

> -----Original Message-----
> From: James Taylor [mailto:[EMAIL PROTECTED]] 
> Sent: 10 June 2002 08:27 PM
> To: [EMAIL PROTECTED]
> Subject: conf files
> 
> 
> I have this app I just wrote, and I wanted to give my users a more 
> 'standard' .conf file, instead of forcing them to open up the script, 
> and dig through and change variables (Some people get confused by 
> this... Go figure).  SO, I wanted to give a .conf sort of like the 
> apache conf file where you'll see things like:
> 
> ENCRYPTION=1 
>       #Set this to 0 if you don't want encryption
> ENCTYPE=3DES 
>       # 3DES or BLOWFISH
> BASEDIR=/home/user 
> # Path to something
> 
> 
> ########## Sockets #################
> 
> PORT=1200 
>               # Port to connect to
> TYPE=TCP 
>               # TCP or UDP
> HOST=localhost 
>               # Hostname
> 
> 
> 
> You get the idea.  Anyway, I could make a file like this and then 
> 'require' it I suppose, then run a regex on the lines and assign the 
> variables THAT way, but I was curious if anyone could think 
> of a better 
> way to do this instead of forcing myself to make all these un-needed 
> lines in my script just to get the variables.  Maybe a module or 
> something?  Any suggestions would be appreciated!
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
NOTICE: This message and any attachments are confidential and intended
solely for the addressee. If you have received this message in error, please
notify the sender at Nanoteq (Pty) Ltd immediately, telephone number +27 (0)
12 672 7000. Any unauthorised use, alteration or dissemination is
prohibited. Nanoteq (Pty) Ltd accepts no liability whatsoever for any loss
whether it be direct, indirect or consequential, arising from information
made available and actions resulting there from.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to