NAME
Unix::Conf::Bind8::Conf::Acl - Class for representing a Bind8 configuration file ACL.
SYNOPSIS
use Unix::Conf::Bind8;
my ($conf, $acl, $ret);
$conf = Unix::Conf::Bind8->new_conf (
FILE => '/etc/named.conf',
SECURE_OPEN => 1,
) or $conf->die ("couldn't open `named.conf'");
# get an existing acl named 'extremix.net-slaves'
$acl = $conf->get_acl ('extremix.net-slaves')
or $acl->die ("couldn't get ACL `extremix.net-slaves');
# or create a new one
$acl = $conf->new_acl (
NAME => 'extremix.com-slaves',
ELEMENTS => [ qw (element1 element2) ],
) or $acl->die ("couldn't create `extremix.com-slaves'");
# set the elements of the ACL. old values are deleted
$ret = $acl->elements ([ qw (10.0.0.1 10.0.0.2) ])
or $ret->die ("couldn't set elements on ACL `extremix.net-slaves'");
# add elements
$ret = $acl->add_elements ([ qw (10.0.0.3 10.0.0.4) ])
or $ret->die ("couldn't add elements to ACL `extremix.net-slaves'");
METHODS
- new ()
-
Arguments NAME => 'ACL-NAME', ELEMENTS => [ qw (element1 element2) ],
Class constructor. Creates a new Unix::Conf::Bind8::Conf::Acl object and returns it if successful, an Err object otherwise. Direct use of this method is deprecated. Use Unix::Conf::Bind8::Conf::new_acl () instead.
- name ()
-
Arguments 'ACL-NAME' # optional
Object method. Get/Set the object's name attribute. If argument is passed, the method tries to set the name attribute to 'ACL-NAME' and returns true if successful, an Err object otherwise. If no argument passed, it returns the name.
- elements ()
-
Arguments [ qw (element1 element2 element3) ], # optional
Object method. Get/Set the object's elements attribute. If an array reference is passed as argument, the method tries to set the elements attribute to the members of the array reference as argument. It returns true on success, an Err object otherwise. If no argument is passed, returns an array reference consisting of the elements of the object if defined, an Err object otherwise.
- add_elements ()
-
Arguments [ qw (element2 element3) ],
Object method. Adds the elements of the array reference passed as argument to the elements of the invocant object. Returns true on success, an Err object otherwise.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 52:
=over without closing =back
- Around line 185:
=cut found outside a pod block. Skipping to next block.
- Around line 194:
=cut found outside a pod block. Skipping to next block.