BIND-Conf_Parser

 view release on metacpan or  search on metacpan

lib/BIND/Conf_Parser.pm  view on Meta::CPAN

    require IO::Scalar;
    my $self = shift;
    my $scalar = shift;
    $self = $self->new		unless ref $self;
    $self->{_fh} = IO::Scalar->new(\$scalar);
    $self->{_file} = @_ ? shift : "a scalar";
    $self->{_line} = 0;
    $self->parse_conf;
}

# The callbacks
sub handle_logging_category {};	# $name, \@names
sub handle_logging_channel {};	# $name, \%options
sub handle_key {};		# $name, $algo, $secret
sub handle_acl {};		# $name, $addrmatchlist
sub handle_option {};		# $option, $argument
sub handle_server {};		# $name, \%options
sub handle_trusted_key {};	# $domain, [ $flags, $proto, $algo, $keydata ]
sub handle_empty_zone {};	# $name, $class, \%options
sub handle_zone {};		# $name, $class, $type, \%options
sub handle_control {};		# $socket_type, \@type_specific_data

lib/BIND/Conf_Parser.pm  view on Meta::CPAN


C<BIND::Conf_Parser> does not perform all the syntactic checks
performed by the parser in F<named> itself.  For example, port numbers
are not verified to be positive intergers in the range 0 to 65535.

The parse() method cannot be called multiple times with parts of
statements.

Comments are not passed to a callback method.

Some callbacks are invoked before the semicolon that terminates the
corresponding syntactic form is actually recognized.  It is therefore
possible for a syntax error to not be detected until after a callback
is invoked for the presumably completly parsed form.  No attempt is
made to delay the invocation of callbacks to the completion of toplevel
statements.

=head1 NOTE

This version of C<BIND::Conf_Parser> corresponds to BIND version 8.2.2
and understands the statements, options, and forms of that version.
Since the BIND developers have only made upward compatible changes to
the syntax, C<BIND::Conf_Parser> will correctly parse valid config files
for previous versions of BIND.



( run in 1.024 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )