BIND::Config::ParserParse BIND Config file | |
Download |
BIND::Config::Parser Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Matt Dainty
- Publisher web site:
- http://www.bodgit-n-scarper.com/
BIND::Config::Parser Tags
BIND::Config::Parser Description
Parse BIND Config file BIND::Config::Parser is a Perl module that provides a lightweight parser to the configuration file syntax of BIND v8 and v9 using a Parse::RecDescent grammar.It is in a similar vein to BIND::Conf_Parser. However, as it has no knowledge of the directives, it doesn't need to be kept updated as new directives are added, it simply knows how to carve up a BIND configuration file into logical chunks.SYNOPSIS use BIND::Config::Parser; # Create the parser my $parser = new BIND::Config::Parser; my $indent = 0; # Set up callback handlers $parser->set_open_block_handler( sub { print " " x $indent, join( " ", @_ ), " { "; $indent++; } ); $parser->set_close_block_handler( sub { $indent--; print " " x $indent, "}; "; } ); $parser->set_statement_handler( sub { print " " x $indent, join( " ", @_ ), "; "; } ); # Parse the file $parser->parse_file( "named.conf" ); Requirements: · Perl
BIND::Config::Parser Related Software