DNS-ZoneParse
view release on metacpan or search on metacpan
lib/DNS/ZoneParse.pm view on Meta::CPAN
$zone_contents = <$inZONE>;
close( $inZONE );
} else {
croak qq[DNS::ZoneParse Could not open input file: "$zonefile":$!];
}
}
if ( $self->_parse( $zonefile, $zone_contents, $origin ) ) { return 1; }
}
sub _parse {
# Support IsAlnum for unicode names.
use utf8;
my ( $self, $zonefile, $contents, $origin ) = @_;
$self->_initialize();
# Here's how we auto-detect the zonefile and origin. Note, the zonefile is
# only used to print out a comment in the file, so its okay if we're
# inaccurate. First, prefer what the user configures. Next, try to read a
# comment we would have written if we wrote the file out in the past.
# Finally, pick up any SOA or $ORIGIN statements present in the file.
if ( ref( $zonefile ) eq 'SCALAR' ) { $zonefile = ''; }
( run in 0.476 second using v1.01-cache-2.11-cpan-f29a10751f0 )