diff -r aff0448cbef9 -r df6ce1a4c43b lib/DNS/Vi.pm --- a/lib/DNS/Vi.pm Wed Jan 21 20:41:45 2015 +0100 +++ b/lib/DNS/Vi.pm Wed Jan 21 21:20:20 2015 +0100 @@ -29,10 +29,20 @@ my @zone; my ($origin, $ttl, $last_label, $soa_seen); + $_ = ''; foreach (@lines) { s{;.*$}{}; # strip trailing comments + state $line; + if (my $range = /(.*)\(\s*$/ .. /(.*)\)\s*/) { + $line .= defined $1 ? $1 : $_; + next unless $range =~ /E0$/; + } + if (defined $line) { + $_ = $line; # accumulated continuation line + $line = undef; + } s{\s*$}{}; # strip off trailing spaces - for ($_) { + given ($_) { when (m{^\s*$}) { next } when (m{^\s*\$ORIGIN\s+(\S+)}) { $origin = $1 } when (m{^\s*\$TTL\s+(\S+)}) { $ttl = $1 }