diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-07-09 22:39:25 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2018-07-09 22:39:25 +0200 |
commit | db3dbb29a2ad58ef2f43d3f9d250e7f90aeaf278 (patch) | |
tree | fa84a90f7f6b304b083c746aeb09a9cc853c3035 /lib/Config | |
parent | eda00b0eaa069d5631efec255ef162b695d73d33 (diff) | |
download | config-parser-db3dbb29a2ad58ef2f43d3f9d250e7f90aeaf278.tar.gz config-parser-db3dbb29a2ad58ef2f43d3f9d250e7f90aeaf278.tar.bz2 |
Use Text::Locus
Diffstat (limited to 'lib/Config')
-rw-r--r-- | lib/Config/Parser.pm | 2 | ||||
-rw-r--r-- | lib/Config/Parser/Ini.pm | 2 |
2 files changed, 2 insertions, 2 deletions
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 @@ -104,7 +104,7 @@ sub loadsynt { && $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 @@ -53,7 +53,7 @@ sub _readconfig { 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); |