line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::LogicBoxes::PrivateNameServer; |
2
|
|
|
|
|
|
|
|
3
|
42
|
|
|
42
|
|
487853
|
use strict; |
|
42
|
|
|
|
|
119
|
|
|
42
|
|
|
|
|
1525
|
|
4
|
42
|
|
|
42
|
|
300
|
use warnings; |
|
42
|
|
|
|
|
108
|
|
|
42
|
|
|
|
|
1384
|
|
5
|
|
|
|
|
|
|
|
6
|
42
|
|
|
42
|
|
826
|
use Moose; |
|
42
|
|
|
|
|
171796
|
|
|
42
|
|
|
|
|
407
|
|
7
|
42
|
|
|
42
|
|
292883
|
use MooseX::StrictConstructor; |
|
42
|
|
|
|
|
47805
|
|
|
42
|
|
|
|
|
431
|
|
8
|
42
|
|
|
42
|
|
149079
|
use namespace::autoclean; |
|
42
|
|
|
|
|
163
|
|
|
42
|
|
|
|
|
425
|
|
9
|
|
|
|
|
|
|
|
10
|
42
|
|
|
42
|
|
5068
|
use WWW::LogicBoxes::Types qw( DomainName Int IPs ); |
|
42
|
|
|
|
|
126
|
|
|
42
|
|
|
|
|
525
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '1.10.0'; # VERSION |
13
|
|
|
|
|
|
|
# ABSTRACT: LogicBoxes Private Nameserver |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has domain_id => ( |
16
|
|
|
|
|
|
|
is => 'ro', |
17
|
|
|
|
|
|
|
isa => Int, |
18
|
|
|
|
|
|
|
required => 1, |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has name => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
isa => DomainName, |
24
|
|
|
|
|
|
|
required => 1, |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has ips => ( |
28
|
|
|
|
|
|
|
is => 'ro', |
29
|
|
|
|
|
|
|
isa => IPs, |
30
|
|
|
|
|
|
|
required => 1, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
37
|
|
|
|
|
|
|
=pod |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
WWW::LogicBoxes::PrivateNameServer - Representation of Private Nameserver |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 SYNOPSIS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
use WWW::LogicBoxes; |
46
|
|
|
|
|
|
|
use WWW::LogicBoxes::Domain; |
47
|
|
|
|
|
|
|
use WWW::LogicBoxes::PrivateNameServer; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $domain = WWW::LogicBoxes::Domain->new( ... ); # Valid LogicBoxes domain |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $private_name_server = WWW::LogicBoxes::PrivateNameServer->new( |
52
|
|
|
|
|
|
|
domain_id => $domain->id, |
53
|
|
|
|
|
|
|
name => 'ns1.' . $domain->name, |
54
|
|
|
|
|
|
|
ips => [ '8.8.8.8', '2001:4860:4860:0:0:0:0:8888' ], # IPv4 and IPv6 are supported |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $logic_boxes = WWW::LogicBoxes->new( ... ); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
my $updated_domain = $logic_boxes->create_private_nameserver( $private_name_server ); |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 DESCRIPTION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Private Nameservers are those that are from the same domain as the L<registered domain|WWW::LogicBoxes::Domain>. For example, a domain test-domain.com could have private nameservers ns1.test-domain.com and ns2.test-domain.com. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
These nameservers must be "registered" with L<LogicBoxes|http://www.logicboxes.com> and it is the responsiblity of WWW::LogicBoxes::PrivateNameServer to represent all of the data assoicated with these registrations. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 B<domain_id> |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The L<domain|WWW::LogicBoxes::Domain> id assoicated with the domain that this will be a private nameserver for (test-domain.com). |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head2 B<name> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
The full domain name that will represent the private nameserver (ns1.test-domain.com). It must be a child of the L<domain|WWW::LogicBoxes::Domain> whose id is being used. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head2 B<ips> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
An ArrayRef of IP addresses ( both IPv4 and IPv6 are supported ) that the above L<name> should resolve to. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=cut |