Subject: | New Data Has Too Much Spacing |
Date: | Tue, 21 Feb 2006 20:44:37 -0800 |
To: | bug-config-std [...] rt.cpan.org |
From: | "David E. Wheeler" <dwheeler [...] cpan.org> |
It seems that the default format for the config files that
Config::Std creates have two newlines after every entry, unless the
entry was ready from a file with some other format.
For example, this script:
#!/usr/bin/perl -w
use strict;
use Config::Std;
my %config = (
foo => {
hey => 'you',
dey => 'vous',
},
bar => {
feh => 'heck',
},
);
write_config( %config => shift );
Outputs this config file:
[bar]
feh: heck
[foo]
dey: vous
hey: you
I would much rather that, by default, it put two newlines after every
section, and only a single newline after each value. Then it would
look like this:
[bar]
feh: heck
[foo]
dey: vous
hey: you
This is much more legible to me, and is more inline with how the vast
majority of INI files are arranged. Was there perhaps a reason that
you didn't do it this way? Maybe it makes more sense to put two
newlines after multi-line config settings (although I should think
that indentation would take care of it)?
Thanks,
David