View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Karthik Krishnamurthy > Unix-Conf-Bind8-0.3 > Unix::Conf::Bind8::Conf::Comment



Annotate this POD

View/Report Bugs


Unix::Conf::Bind8::Conf::Comment - Class for handling comments between directives.


        use Unix::Conf::Bind8;

        my ($conf, $acl);
        $conf = Unix::Conf::Bind8->new_conf (
                FILE        => '/etc/named.conf',
                SECURE_OPEN => 1,
        ) or $conf->die ("couldn't open `named.conf'");

        $acl = $conf->new_acl (
                NAME            => '',
                ELEMENTS        => [ qw ( ],
        ) or $acl->die ("couldn't create acl `'");

        $comment = $conf->new_comment (
                COMMENT         => '// Elements of this Acl are allowed to transfer this zone',
                WHERE           => 'BEFORE',
                WARG            => $acl,
        ) or $comment->die ("couldn't create comment");

This class is not meant to be used directly, but is used instead by the parser to store intra directive comments.


new ()
 COMMENT        => 'comment',
 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 Unix::Conf::Bind8::Conf::Comment object and returns it, on success, an Err object otherwise. Do not use this constructor directly. Use the Unix::Conf::Bind8::Conf::new_comment method () instead.

comment ()

Object method. Get/set the comment. If argument is passed, sets the comment, and returns true on success, an Err object otherwise. If no argument is passed, returns the set value.

syntax highlighting: