Augie Schwer > PowerDNS-Control-Client-0.03 > PowerDNS::Control::Client

Download:
PowerDNS-Control-Client-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source  

NAME ^

PowerDNS::Control::Client - Provides an interface to control the PowerDNS daemon.

VERSION ^

Version 0.03

SYNOPSIS ^

        use PowerDNS::Control::Client;

        # Setting parameters and their default values.
        my $params = {  servers         =>      ['localhost:988'],
                        auth_cred       =>      'pa55word',
        };

        my $pdns = PowerDNS::Control::Client->new($params);

DESCRIPTION ^

        PowerDNS::Control::Client provides a client interface to interact
        with the PowerDNS::Control::Server server.

        It is maintained in tandem with PowerDNS::Control::Server and is
        intended to be used with that code; it also serves as a point of
        reference for anyone who wishes to create their own client code.

        The methods described below are based on those available in the
        PowerDNS::Control::Server module which are in turn based on the
        pdns_control and rec_control programs. Documentation for these 
        programs can be found at:

        http://docs.powerdns.com/

        Note: All the commands may not be supported in this module, but the list of
        supported commands is listed in the Methods section below. Methods that begin
        with 'auth' control the Authoritative PowerDNS Server and methods that begin
        with 'rec' control the Recursive PowerDNS Server.

METHODS ^

new(\%params)

        my $params = {  servers         =>      ['localhost:988'],
                        auth_cred       =>      'pa55word',
        };

        my $pdns = PowerDNS::Control::Client->new($params);

        Creates a new PowerDNS::Control::Client object.
servers

A list of servers and ports to connect to. Default is 'localhost:988'.

auth_cred

The authentication credentials the client should provide when the server asks for authentication.

tell($command_string)

Internal method. Expects a scalar command string to send to all of the servers in the 'servers' param; i.e. tell the servers what to do. Returns 0 on success and an Error Message if there was a problem.

connect(\$server)

Internal method. Connects to a server and handle authentication if need be. Expects a scalar reference to a single server to connect to. Returns a socket object that can be used to communicate with the server or undef if there was a problem.

auth_retrieve($domain)

Tells the Authoritative PowerDNS Server to retrieve a domain. Expects a scalar domain name. Returns 0 on success, error message otherwise.

auth_wipe_cache($domain)

Tells the Authoritative PowerDNS server to wipe $domain out of its cache. Expects a scalar domain name. Returns 0 on success, error message otherwise.

rec_wipe_cache($domain)

Tells the Recursive PowerDNS server to wipe $domain out of its cache. Expects a scalar domain name. Returns 0 on success, error message otherwise.

rec_ping

Asks the server if the recursor is running. Expects nothing. Returns 0 on success, error message otherwise.

auth_ping

Asks the server if the authoritative server is running. Expects nothing. Returns 0 on success, error message otherwise.

AUTHOR ^

Augie Schwer, <augie at cpan.org>

http://www.schwer.us

BUGS ^

Please report any bugs or feature requests to bug-powerdns-control-client at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PowerDNS-Control-Client. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc PowerDNS::Control::Client

You can also look for information at:

ACKNOWLEDGEMENTS ^

I would like to thank Sonic.net for allowing me to release this to the public.

COPYRIGHT & LICENSE ^

Copyright 2007 Augie Schwer, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

VERSION ^

        0.03
        $Id: Client.pm 4435 2012-01-14 01:13:46Z augie $
syntax highlighting: