PowerDNS::Control::Client - Provides an interface to control the PowerDNS daemon.
Version 0.03
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);
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.
my $params = { servers => ['localhost:988'], auth_cred => 'pa55word', }; my $pdns = PowerDNS::Control::Client->new($params); Creates a new PowerDNS::Control::Client object.
A list of servers and ports to connect to. Default is 'localhost:988'.
The authentication credentials the client should provide when the server asks for authentication.
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.
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.
Tells the Authoritative PowerDNS Server to retrieve a domain. Expects a scalar domain name. Returns 0 on success, error message otherwise.
Tells the Authoritative PowerDNS server to wipe $domain out of its cache. Expects a scalar domain name. Returns 0 on success, error message otherwise.
Tells the Recursive PowerDNS server to wipe $domain out of its cache. Expects a scalar domain name. Returns 0 on success, error message otherwise.
Asks the server if the recursor is running. Expects nothing. Returns 0 on success, error message otherwise.
Asks the server if the authoritative server is running. Expects nothing. Returns 0 on success, error message otherwise.
Augie Schwer, <augie at cpan.org>
<augie at cpan.org>
http://www.schwer.us
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.
bug-powerdns-control-client at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc PowerDNS::Control::Client
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/PowerDNS-Control-Client
CPAN Ratings
http://cpanratings.perl.org/d/PowerDNS-Control-Client
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=PowerDNS-Control-Client
Search CPAN
http://search.cpan.org/dist/PowerDNS-Control-Client
I would like to thank Sonic.net for allowing me to release this to the public.
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.
0.03 $Id: Client.pm 4435 2012-01-14 01:13:46Z augie $
To install PowerDNS::Control::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PowerDNS::Control::Client
CPAN shell
perl -MCPAN -e shell install PowerDNS::Control::Client
For more information on module installation, please visit the detailed CPAN module installation guide.