The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DNS::PunyDNS - Interact with your SAPO dynamic DNS entries

VERSION

Version 0.02

SYNOPSIS

This module allows you to create/remove/update your SAPO dynamic DNS entries (http://sl.pt).

        use DNS::PunyDNS;

        my $dns = DNS::PunyDNS->new({'username' => '<sapousername>', password => '<sapopassword>' } );

        my $added = $dns->add_dns( $domain, $ip, $record_type );

        if (!$added) {
                warn $dns->{'error'};
        }
    ...

METHODS

new

Creates a new DNS::PunyDNS object.

        DNS::PunyDNS->new( { 'username' => '<sapousername>', 'password' => '<sapopassword>' } )

Your SAPO username and password must be provided.

add_dns

Adds a dynamic DNS entry.

        $dns->add_dns( $domain, $ip, $record_type );

This function returns false if the operation fails, the cause of the failure is set in $dns->{'error'}.

update_dns

Updates a dynamic DNS entry.

        $dns->update_dns( $domain, $ip, $record_type, [$old_record_type]);

This function returns false if the operation fails, the cause of the failure is set in $dns->{'error'}.

get_dns_info

Gets DNS information of a specific entrry.

        my $info = $dns->get_dns_info( $domain );

list_dns

Gets all the dynamic DNS entry names associated with your account.

        my $list = $dns->list_dns();

list_dns_info

Gets all the dynamic DNS entrys information.

        my $list_info = $dns->list_dns_info(); 

remove_dns

Removes a DNS entry.

        $removed = $dns->remove_dns( $domain, [$record_type] );

This function returns false if the operation fails, the cause of the failure is set in $dns->{'error'}.

AUTHOR

Bruno Martins, <bruno-martins at telecom.pt>

NOTES

Handling Errors

There are several ways that the operations can fail, for example, you can try to add a dns entry that already exists or you can try to update a dns entry that is not under your account, etc.

Each time an operation is executed and raises an error $dns->{'error'} is set with the error reason.

SAPO dynamic DNS API authentication

SAPO dynamic DNS API is only available over https, so your username and password are not sent clean

Record Types

SAPO dynamic DNS API only allows A and AAAA record types

Domain names

At this time, SAPO dynamic DNS only allows .sl.pt domains

SUPPORT

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

    perldoc DNS::PunyDNS

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2011 Bruno Martins <bruno-martins at telecom.pt> and SAPO http://www.sapo.pt, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.