blib/lib/WWW/LogicBoxes/PrivateNameServer.pm

filter: Statementstmt 100% 24 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 30 / 30 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/WWW/LogicBoxes/DomainRequest.pm ↑ Summary
1 package WWW::LogicBoxes::PrivateNameServer;
2  
3 45 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 45 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 45 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 45 ▶use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 45 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 45 ▶use WWW::LogicBoxes::Types qw( DomainName Int IPv4s );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 45 our $VERSION = '1.1.0'; # VERSION
13 # ABSTRACT: LogicBoxes Private Nameserver
14  
15 45 has domain_id => (
16 is => 'ro',
17 isa => Int,
18 required => 1,
19 );
20  
21 45 has name => (
22 is => 'ro',
23 isa => DomainName,
24 required => 1,
25 );
26  
27 45 has ips => (
28 is => 'ro',
29 isa => IPv4s,
30 required => 1,
31 );
32  
33 45 __PACKAGE__->meta->make_immutable;
34 45 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 => [ '4.2.2.1', '8.8.8.8' ],
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 IPv4 addresses that the above L<name> should resolve to.
80  
81 =cut
« blib/lib/WWW/LogicBoxes/DomainRequest.pm ↑ Summary