Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Config::Std blank entry in hash, and blank line

by carcassonne (Pilgrim)
on Dec 15, 2005 at 13:16 UTC ( #516948=note: print w/ replies, xml ) Need Help??


in reply to Re: Config::Std blank entry in hash, and blank line
in thread Config::Std blank entry in hash, and blank line

I guess read_config could look at the input file's layout and intuit whether you're separating section markers from config variables.

Maybe just adding a configurable parameter like 'noExtraNewlines' that would put newlines only in-between sections when adding entries ? That is, the current scheme of the user's file use of newlines would be preserved. Only new entries would be adopting the configurable option. Concern is, many users coudl eventually modify the same INI file, each one adding newlines when he/she sees it fit.

How about then an INI file formatter that would straigthen this out according to a defined (and configurable) scheme ? ;-)


Comment on Re^2: Config::Std blank entry in hash, and blank line
Re^3: Config::Std blank entry in hash, and blank line
by TheDamian (Priest) on Dec 15, 2005 at 22:45 UTC
    I would prefer not to add any more configuration parameters. The idea here is simplicity and avoiding too many variations (hence ::Std ;-)

    An INI formatter would be a great idea, but this module isn't (going to be) that.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-09-18 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (123 votes), past polls