Mojo::Cloudflare::Record - Represent a Cloudflare DNS record
Mojo::Cloudflare::Record represents a DNS record in the Mojo::Cloudflare module.
This module inherit from Mojo::JSON::Pointer.
$str = $self->content; $self = $self->content($str);
The content of the DNS record, will depend on the the type of record being added.
This attribute is required to do anything useful with this object.
$str = $self->id;
The identifier from Cloudflare. Can only be set in constructor.
$str = $self->name; $self = $self->name($str);
Name of the DNS record.
$int = $self->priority; $self = $self->priority($int);
MX record priority.
$int = $self->ttl; $self = $self->ttl($int);
TTL of record in seconds. 1 (default) = Automatic, otherwise, value must in between 120 and 86400 seconds.
$int = $self->service_mode; $self = $self->service_mode($int);
Status of CloudFlare Proxy: 1 = orange cloud (active), 0 = grey cloud (deactive).
$str = $self->type; $self = $self->type($str);
Type of the DNS record: A, CNAME, MX, TXT, SPF, AAAA, NS, SRV, or LOC.
$self = $self->delete(sub { my($self, $err) = @_; ... }); $self = $self->delete; # die $err on failure
Used to save delete record from Cloudflare.
$self = $self->save(sub { my($self, $err) = @_; ... }); $self = $self->save; # die $err on failure
Used to save record to Cloudflare.
Copyright (C) 2014, Jan Henning Thorsen
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.
Jan Henning Thorsen - jhthorsen@cpan.org
jhthorsen@cpan.org
To install Mojo::Cloudflare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::Cloudflare
CPAN shell
perl -MCPAN -e shell install Mojo::Cloudflare
For more information on module installation, please visit the detailed CPAN module installation guide.