The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Unix::Conf::Bind8::DB - Class implementing methods for manipulation of a Bind records file.

SYNOPSIS

Refer to the SYNOPSIS section for Unix::Conf::Bind8

DESCRIPTION

This class has interfaces for the various classes residing beneath Unix::Conf::Bind8::DB. This class should not be accessed directly. Methods in this class are to be accessed through a Unix::Conf::Bind8::DB object which is returned by Unix::Conf::Bind8->new_db () or by invoking the get_db () object method in Unix::Conf::Bind8::Conf or Unix::Conf::Bind8::Conf::Zone. Refer to the relevant documentation for further details.

new ()
 Arguments
 FILE        => 'pathname',   # 
 ORIGIN      => 'value',      # origin
 CLASS       => 'class',      # ('in'|'hs'|'chaos')
 SECURE_OPEN => 0/1,          # optional (enabled (1) by default)

Class constructor Creates a Unix::Conf::Bind8::DB object and returns it if successful, an Err object otherwise. Direct use of this method is deprecated. Use Unix::Conf::Bind8::Zone::get_db (), or Unix::Conf::Bind8::new_db () instead.

origin ()
 Arguments
 'origin',   # optional. if the argument is not absolute, i.e.
             # having a trailing '.', the existing origin, if
                     # any will be appended to the argument.

Object method. Get/Set DB origin. If argument is passed, the method tries to set the origin of the DB object to 'origin' and returns true on success, an Err object otherwise. If no argument is specified, returns the name of the zone, if defined, an Err object otherwise.

fh ()

Object method. Returns the Unix::Conf::ConfIO object representing the DB file.

dirty ()

Object method. Get/Set the DIRTY flag in invoking Unix::Conf::Bind8::DB object.

class ()
 Arguments
 'class'      # ('in'|'hs'|'chaos')

Object method. Get/Set object class. If argument is passed, the method tries to set the class attribute to 'class' and returns true if successful, an Err object otherwise. If no argument is passed, returns the value of the class attribute if defined, an Err object otherwise.

new_soa ()
 Arguments
 CLASS   =>
 TTL     =>
 AUTH_NS =>
 MAIL_ADDR   =>
 SERIAL  =>
 REFRESH =>
 RETRY   =>
 EXPIRE  =>
 MIN_TTL =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::SOA object with the invoking Unix::Conf::Bind8::DB object and returns it on success, an Err object otherwise.

get_soa ()

Object method. Returns the Unix::Conf::Bind8::DB::SOA object associated with the invoking Unix::Conf::Bind8::DB object if defined, an Err object otherwise.

delete_soa ()

Object method. Deletes the Unix::Conf::Bind8::DB::SOA object associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object otherwise.

new_ns ()
 Arguments
 LABEL          =>
 RTYPE          =>
 RDATA          =>
 CLASS          =>
 TTL            =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::NS object with the invoking Unix::Conf::Bind8::DB object and returns it on success an Err object otherwise.

new_a ()
 Arguments
 LABEL          =>
 RTYPE          =>
 RDATA          =>
 CLASS          =>
 TTL            =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::A object with the invoking Unix::Conf::Bind8::DB object and returns it on success an Err object otherwise.

new_mx ()
 Arguments
 LABEL          =>
 RTYPE          =>
 MXPREF         =>
 RDATA          =>
 CLASS          =>
 TTL            =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::MX object with the invoking Unix::Conf::Bind8::DB object and returns it on success an Err object otherwise.

new_ptr ()
 Arguments
 LABEL          =>
 RTYPE          =>
 RDATA          =>
 CLASS          =>
 TTL            =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::PTR object with the invoking Unix::Conf::Bind8::DB object and returns it on success an Err object otherwise.

new_cname ()
 Arguments
 LABEL          =>
 RTYPE          =>
 RDATA          =>
 CLASS          =>
 TTL            =>

Object method. Creates and associates a new Unix::Conf::Bind8::DB::CNAME object with the invoking Unix::Conf::Bind8::DB object and returns it on success an Err object otherwise.

get_ns ()
 Arguments
 'label',
 'rdata'                        # optional

Object method. Returns the Unix::Conf::Bind8::DB::NS object associated with the invoking Unix::Conf::Bind8::DB object, with label 'label' and rdata 'rdata'. If the rdata argument is not passed, then all NS record objects attached to label 'label' are returned in an anonymous array. On failure an Err object is returned.

get_a ()
 Arguments
 'label',
 'rdata'                        # optional

Object method. Returns the Unix::Conf::Bind8::DB::A object associated with the invoking Unix::Conf::Bind8::DB object, with label 'label' and rdata 'rdata'. If the rdata argument is not passed, then all A record objects attached to label 'label' are returned in an anonymous array. On failure an Err object is returned.

get_mx ()
 Arguments
 'label',
 'rdata'                        # optional

Object method. Returns the Unix::Conf::Bind8::DB::MX object associated with the invoking Unix::Conf::Bind8::DB object, with label 'label' and rdata 'rdata'. If the rdata argument is not passed, then all MX record objects attached to label 'label' are returned in an anonymous array. On failure an Err object is returned.

get_ptr ()
 Arguments
 'label',
 'rdata'                        # optional

Object method. Returns the Unix::Conf::Bind8::DB::PTR object associated with the invoking Unix::Conf::Bind8::DB object, with label 'label' and rdata 'rdata'. If the rdata argument is not passed, then all PTR record objects attached to label 'label' are returned in an anonymous array. On failure an Err object is returned.

get_cname ()
 Arguments
 'label',
 'rdata'                        # optional

Object method. Returns the Unix::Conf::Bind8::DB::CNAME object associated with the invoking Unix::Conf::Bind8::DB object, with label 'label' and rdata 'rdata'. If the rdata argument is not passed, then all CNAME record objects attached to label 'label' are returned in an anonymous array. On failure an Err object is returned.

set_ns ()
 Arguments
 'label',
 [
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        ....
 ],

Object method. Creates and associates Unix::Conf::Bind8::DB::NS objects with the relevant attributes with the invoking Unix::Conf::Bind8::DB object. Returns true on success, an Err object otherwise. The existing Unix::Conf::Bind8::DB::NS objects attached to this label are deleted.

set_a ()
 Arguments
 'label',
 [
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        ....
 ],

Object method. Creates and associates Unix::Conf::Bind8::DB::A objects with the relevant attributes with the invoking Unix::Conf::Bind8::DB object. Returns true on success, an Err object otherwise. The existing Unix::Conf::Bind8::DB::A objects attached to this label are deleted.

set_mx ()
 Arguments
 'label',
 [
        { CLASS => 'class', TTL => 'ttl', MXPREF => pref, RDATA => 'rdata',  },
        { CLASS => 'class', TTL => 'ttl', MXPREF => pref, RDATA => 'rdata',  },
        ....
 ],

Object method. Creates and associates Unix::Conf::Bind8::DB::MX objects with the relevant attributes with the invoking Unix::Conf::Bind8::DB object. Returns true on success, an Err object otherwise. The existing Unix::Conf::Bind8::DB::MX objects attached to this label are deleted.

set_ptr ()
 Arguments
 'label',
 [
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        ....
 ],

Object method. Creates and associates Unix::Conf::Bind8::DB::PTR objects with the relevant attributes with the invoking Unix::Conf::Bind8::DB object. Returns true on success, an Err object otherwise. The existing Unix::Conf::Bind8::DB::PTR objects attached to this label are deleted.

set_cname ()
 Arguments
 'label',
 [
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        { CLASS => 'class', TTL => 'ttl', RDATA => 'rdata',  },
        ....
 ],

Object method. Creates and associates Unix::Conf::Bind8::DB::CNAME objects with the relevant attributes with the invoking Unix::Conf::Bind8::DB object. Returns true on success, an Err object otherwise. The existing Unix::Conf::Bind8::DB::CNAME objects attached to this label are deleted.

delete_ns ()
 Arguments
 'label',
 'rdata',

Object method. Deletes the Unix::Conf::Bind8::DB::NS object with label 'label' and rdata 'rdata', associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object. If the rdata argument is not passed, then all NS records attached to label 'label' are deleted.

delete_a ()
 Arguments
 'label',
 'rdata',

Object method. Deletes the Unix::Conf::Bind8::DB::A object with label 'label' and rdata 'rdata', associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object. If the rdata argument is not passed, then all A records attached to label 'label' are deleted.

delete_mx ()
 Arguments
 'label',
 'rdata',

Object method. Deletes the Unix::Conf::Bind8::DB::MX object with label 'label' and rdata 'rdata', associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object. If the rdata argument is not passed, then all MX records attached to label 'label' are deleted.

delete_ptr ()
 Arguments
 'label',
 'rdata',

Object method. Deletes the Unix::Conf::Bind8::DB::PTR object with label 'label' and rdata 'rdata', associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object. If the rdata argument is not passed, then all PTR records attached to label 'label' are deleted.

delete_cname ()
 Arguments
 'label',
 'rdata',

Object method. Deletes the Unix::Conf::Bind8::DB::CNAME object with label 'label' and rdata 'rdata', associated with the invoking Unix::Conf::Bind8::DB object if defined and returns true, an Err object. If the rdata argument is not passed, then all CNAME records attached to label 'label' are deleted.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 24:

=over without closing =back