Unix::Conf::Bind8::Conf::Server - Class for handling Bind8 configuration directive `server'
use Unix::Conf::Bind8; my ($conf, $server, $ret); $conf = Unix::Conf::Bind8->new_conf ( FILE => '/etc/named.conf', SECURE_OPEN => 1, ) or $conf->die ("couldn't open `named.conf'"); # # Ways to get a server object. # $server = $conf->new_server ( NAME => '192.168.1.1', BOGUS => 'yes', ) or $server->die ("couldn't create server `192.168.1.1'"); # OR $server = $conf->get_server ('10.0.0.1') or $server->die ("couldn't get server `10.0.0.1'"); # # Operations that can be performed on a server object. # $ret = $server->bogus ('no') or $ret->die ("couldn't set attribute"); $ret = $server->keys (qw (extremix-slaves.key sample_key)); # get attributes $ret = $server->keys () or $ret->die ("couldn't get keys"); local $" = "\n"; printf "Keys defined:\n@$ret\n"; # delete attribute $ret = $server->delete_transfer_format () or $ret->die ("couldn't delete attribute");
Arguments NAME => scalar, BOGUS => scalar, # Optional TRANSFERS => scalar, # Optional SUPPORT-IXFR => scalar, TRANSFER-FORMAT => scalar, # Optional KEYS => [elements ], # Optional WHERE => 'FIRST'|'LAST'|'BEFORE'|'AFTER' WARG => Unix::Conf::Bind8::Conf::Directive subclass object # WARG is to be provided only in case WHERE eq 'BEFORE # or WHERE eq 'AFTER' PARENT => reference, # to the Conf object datastructure.
Class constructor. Creates a new Unix::Conf::Bind8::Conf::Server object, and returns it, on success, an Err object otherwise. Do not call this constructor directly. Use Unix::Conf::Bind8::Conf::new_server () instead.
Arguments value # optional
Object method. Get/set the name attribute in the invocant. Returns the attribute value or true on success, an Err object otherwise.
Object method. Deletes the corresponding attribute, if defined, and returns true, an Err object otherwise.
Arguments value # number, optional
Arguments value # 'one-answer'|'many-answers', optional
Arguments LIST # name, optional or [ LIST ]
1 POD Error
The following errors were encountered while parsing the POD:
=over without closing =back
To install Unix::Conf::Bind8, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unix::Conf::Bind8
CPAN shell
perl -MCPAN -e shell install Unix::Conf::Bind8
For more information on module installation, please visit the detailed CPAN module installation guide.