Unix::Conf::Bind8::Conf 0.3 review
DownloadUnix::Conf::Bind8::Conf is a front end for a suite of classes for manipulating a Bind8 style configuration file. SYNOPSIS m
|
|
Unix::Conf::Bind8::Conf is a front end for a suite of classes for manipulating a Bind8 style configuration file.
SYNOPSIS
my ($conf, $obj, $ret);
$conf = Unix::Conf::Bind8->new_conf (
FILE => 'named.conf',
SECURE_OPEN => '/etc/named.conf',
) or $conf->die ("couldn't create `named.conf'");
#
# All directives have corrresponding new_*, get_*, delete_*
# methods
#
$obj = $conf->new_zone (
NAME => 'extremix.net',
TYPE => 'master',
FILE => 'db.extremix.net',
) or $obj->die ("couldn't create zone `extremix.net'");
# For objects that have a name attribute, name is to
# be specified, otherwise no arguments are needed.
$obj = $conf->get_zone ('extremix.net')
or $obj->die ("couldn't get zone `extremix.net'");
$obj = $conf->get_options ()
or $obj->die ("couldn't get options");
# For objects that have a name attribute, name is to
# be specified, otherwise no arguments are needed.
$obj = $conf->delete_zone ('extremix.net')
or $obj->die ("couldn't delete zone `extremix.net'");
$obj = $conf->delete_options ()
or $obj->die ("couldn't get options");
# directives that have a name attribute, have iterator
# methods
printf ("Zones defined in %s:n", $conf->fh ());
for my $zone ($conf->zones ()) {
printf ("%sn", $zone->name ();
}
printf ("Directives defined in %s:n", $conf->fh ());
for my $dir ($conf->directives ()) {
print ("$dirn");
}
$db = $conf->get_db ('extremix.net')
or $db->die ("couldn't get db for `extremix.net'");
This class has interfaces for the various class methods of the classes that reside beneath Unix::Conf::Bind8::Conf. This class is an internal class and should not be accessed directly. Methods in this class can be accessed through a Unix::Conf::Bind8::Conf object which is returned by Unix::Conf::Bind8->new_conf ().
Requirements:
Perl
Unix::Conf
Unix::Conf::Bind8::Conf 0.3 search tags