File Coverage

blib/lib/XML/SRS/Whois.pm
Criterion Covered Total %
statement 2 4 50.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 4 6 66.6


line stmt bran cond sub pod time code
1              
2             package XML::SRS::Whois;
3             BEGIN {
4 1     1   1683 $XML::SRS::Whois::VERSION = '0.09';
5             }
6              
7 1     1   388 use Moose;
  0            
  0            
8             use PRANG::Graph;
9             use MooseX::Aliases;
10             use MooseX::Aliases::Meta::Trait::Attribute;
11              
12             has_attr 'full' =>
13             is => "ro",
14             isa => "XML::SRS::Boolean",
15             xml_name => "FullResult",
16             predicate => "has_full",
17             lazy => 1,
18             default => sub {1},
19             ;
20              
21             has_attr 'source_ip' =>
22             is => "ro",
23             isa => "Str",
24             predicate => "has_source_ip",
25             xml_name => "SourceIP",
26             ;
27              
28             has_attr 'domain_name' =>
29             is => "ro",
30             isa => "XML::SRS::DomainName",
31             xml_name => "DomainName",
32             required => 1,
33             traits => [qw(Aliased)],
34             alias => 'domain',
35             ;
36              
37             sub root_element {"Whois"}
38             with 'XML::SRS::Query';
39             1;
40              
41             __END__
42              
43             =head1 NAME
44              
45             XML::SRS::Whois - Class representing an SRS Whois transaction
46              
47             =head1 SYNOPSIS
48              
49             my $whois = XML::SRS::Whois->new(
50             full => 1,
51             source_ip => 192.168.1.1,
52             domain => 'nzrs.net.nz',
53             );
54              
55             =head1 DESCRIPTION
56              
57             This class represents an SRS Whois request. The root XML element of this
58             class is 'Whois'.
59              
60             =head1 ATTRIBUTES
61              
62             Each attribute of this class has an accessor/mutator of the same name as
63             the attribute. Additionally, they can be passed as parameters to the
64             constructor.
65              
66             =head2 full
67              
68             Optional boolean. Maps to FullResult XML attribute.
69              
70             =head2 source_ip
71              
72             Optional string. Maps to SourceIP XML attribute.
73              
74             =head2 domain
75              
76             Required string, containing a valid domain name to query on.
77              
78             =head1 METHODS
79              
80             =head2 new(%params)
81              
82             Construct a new XML::SRS::Request object. %params specifies the initial
83             values of the attributes.
84              
85             =head1 COMPOSED OF
86              
87             L<XML::SRS::Query>