diff options
-rw-r--r-- | Makefile.PL | 1 | ||||
-rw-r--r-- | lib/Config/Parser.pm | 2 | ||||
-rw-r--r-- | lib/Config/Parser/Ini.pm | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.PL b/Makefile.PL index 8ff01ae..bc0ba75 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,12 +13,13 @@ WriteMakefile(NAME => 'Config::Parser', PREREQ_PM => { 'Carp' => 0, 'Text::ParseWords' => 0, 'Class::Inspector' => 0, 'Data::Dumper' => '2.135_06', 'File::Temp' => '0.22', + 'Text::Locus' => '1.01' }, META_MERGE => { 'meta-spec' => { version => 2 }, resources => { repository => { type => 'git', diff --git a/lib/Config/Parser.pm b/lib/Config/Parser.pm index c0a2179..93b23fc 100644 --- a/lib/Config/Parser.pm +++ b/lib/Config/Parser.pm @@ -101,13 +101,13 @@ sub loadsynt { } while (($val = shift @words) && $val =~ /^:(?<kw>.+?)(?:\s*=\s*(?<val>.*))?$/) { $ret->{$+{kw}} = $+{val} // 1; } - $ret->{default} = $val if $val; + $ret->{default} = $val if defined($val); ($name, $ret); } })->{section}; } } diff --git a/lib/Config/Parser/Ini.pm b/lib/Config/Parser/Ini.pm index b3a1ef9..3b39a16 100644 --- a/lib/Config/Parser/Ini.pm +++ b/lib/Config/Parser/Ini.pm @@ -50,13 +50,13 @@ sub _readconfig { s/^\s+//; s/\s+$//; s/#.*//; next if ($_ eq ""); - my $locus = new Config::Tree::Locus($file, $line); + my $locus = new Text::Locus($file, $line); if (/^\[(.+?)\]$/) { @path = parse_line('\s+', 0, $1); if (@path == 1 && $path[0] eq 'include') { $include = 1; } else { |