Skip to content

Commit 8cfbae4

Browse files
committed
Fixed assignment of default list of configuration directories
1 parent 6d4a0d1 commit 8cfbae4

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Changes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Revision history for Perl extension Config::Processor.
22

3+
0.14 Thu Nov 25 16:34:45 MSK 2016
4+
- BUGFIX: Fixed assignment of default list of configuration directories.
5+
36
0.12 Thu Nov 24 11:36:40 MSK 2016
47
- Decreased version of required modules YAML::XS and Cpanel::JSON::XS.
58

@@ -16,7 +19,7 @@ Revision history for Perl extension Config::Processor.
1619

1720
0.04 Thu Apr 28 14:39:38 MSK 2016
1821
- Data::Rmap was replaced by own function.
19-
- Fixed wrong behavior during processing of directives.
22+
- BUGFIX: Fixed wrong behavior during processing of directives.
2023
- Improved logic of tree traversal.
2124
- Improved logic of variable resolving.
2225

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Config-Processor version 0.12
1+
Config-Processor version 0.14
22
=============================
33

44
INSTALLATION

lib/Config/Processor.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.008000;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '0.12';
7+
our $VERSION = '0.14';
88

99
use File::Spec;
1010
use YAML::XS qw( LoadFile );
@@ -49,7 +49,9 @@ sub new {
4949
my $self = bless {}, $class;
5050

5151
$self->{dirs} = $params{dirs} || [];
52-
push( @{ $params{dirs} }, '.' );
52+
unless ( @{ $self->{dirs} } ) {
53+
push( @{ $self->{dirs} }, '.' );
54+
}
5355

5456
$self->{interpolate_variables} = exists $params{interpolate_variables}
5557
? $params{interpolate_variables} : 1;
@@ -71,7 +73,7 @@ sub new {
7173
*{$name} = sub {
7274
my $self = shift;
7375

74-
if ( @_ ) {
76+
if (@_) {
7577
$self->{$name} = shift;
7678
}
7779

0 commit comments

Comments
 (0)