Skip to content

Commit

Permalink
Change spacing option from 'config' to 'payload'
Browse files Browse the repository at this point in the history
for consistency
  • Loading branch information
rwstauner committed Mar 3, 2013
1 parent 1d05c6a commit 47cf4f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/Config/MVP/Writer/INI.pm
Expand Up @@ -11,8 +11,8 @@ use List::AllUtils ();

has spacing => (
is => 'ro',
isa => enum([qw( none all config )]),
default => 'config',
isa => enum([qw( none all payload )]),
default => 'payload',
);

=for comment
Expand Down Expand Up @@ -46,8 +46,8 @@ sub ini_string {
# put a blank line after each section
@strings = map { "$_\n" } @strings;
}
elsif( $spacing eq 'config' ){
# put a blank line around any section with a config
elsif( $spacing eq 'payload' ){
# put a blank line around any section with a payload
@strings = map { /\n.+/ ? "\n$_\n" : $_ } @strings;
}

Expand Down Expand Up @@ -177,7 +177,7 @@ This takes an array ref of array refs,
each one being a C<Config::MVP> style section specification:
[
[ $name, $package, \%config ],
[ $name, $package, \%payload ],
]
and returns a string.
Expand Down
2 changes: 1 addition & 1 deletion t/spacing.t
Expand Up @@ -71,7 +71,7 @@ test_spacing all => <<INI;
[Lullaby / A]
INI

test_spacing config => <<INI;
test_spacing payload => <<INI;
[Crashin]
[Spinning]
Expand Down

0 comments on commit 47cf4f7

Please sign in to comment.