File Coverage

blib/lib/XML/EPP/Greeting.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1              
2             package XML::EPP::Greeting;
3              
4             # based on epp-1.0.xsd:greetingType
5              
6 1     1   2758 use Moose;
  0            
  0            
7             use MooseX::Method::Signatures;
8             use Moose::Util::TypeConstraints;
9             use PRANG::Graph;
10             our $PKG = "XML::EPP::Greeting";
11             our $SCHEMA_PKG = "XML::EPP";
12              
13             has_element 'server_name' =>
14             is => "rw",
15             isa => "${SCHEMA_PKG}::sIDType",
16             xml_nodeName => "svID",
17             required => 1,
18             ;
19              
20             has_element 'server_time' =>
21             is => "rw",
22             isa => "PRANG::XMLSchema::dateTime",
23             coerce => 1,
24             xml_nodeName => "svDate",
25             required => 1,
26             ;
27              
28             use XML::EPP::SvcMenu;
29             has_element 'services' =>
30             is => "rw",
31             isa => "${SCHEMA_PKG}::svcMenuType",
32             xml_nodeName => "svcMenu",
33             coerce => 1,
34             required => 1,
35             ;
36              
37             has_element 'dcp' =>
38             is => "rw",
39             isa => "${SCHEMA_PKG}::DCP",
40             coerce => 1,
41             required => 1,
42             ;
43              
44             with 'XML::EPP::Node';
45              
46             subtype "${SCHEMA_PKG}::greetingType"
47             => as __PACKAGE__;
48              
49             sub is_command { 1 }
50              
51             1;
52              
53             __END__
54              
55             =head1 NAME
56              
57             XML::EPP::Greeting - a server greeting message
58              
59             =head1 SYNOPSIS
60              
61             use MooseX::TimestampTZ qw(gmtimestamptz);
62              
63             my $greeting = XML::EPP::Greeting->new(
64             server_name => "myhostname",
65             current_time => gmtimestamptz,
66             services => "auto",
67             dcp => {
68             access => "personalAndOther",
69             statement => {
70             purpose => "prov",
71             recipient => "ours",
72             retention => "business",
73             },
74             expiry => "PY1",
75             },
76             );
77              
78             =head1 DESCRIPTION
79              
80             This class represents the C<epp:greetingType> defined in RFC5730.
81             Messages of this type are returned by the server on a new connection,
82             or in response to a C<hello> message (see L<XML::EPP::Hello>).
83              
84             The following properties are defined;
85              
86             =over
87              
88             =item B<server_name>
89              
90             (Str; XML: C<svID>) "the name of the server"
91              
92             =item B<server_time>
93              
94             (Str; XML: C<svDate>) "the server's current date and time in Universal
95             Coordinated Time (UTC).
96              
97             =item B<services>
98              
99             (L<XML::EPP::SvcMenu>; XML: C<svcMenu>) "identifies the services
100             supported by the server" - essentially a protocol feature/version
101             negotiation property. Set to C<auto> on the server for automagic
102             setting of values based on globals defined in L<XML::EPP>.
103              
104             =item B<dcp>
105              
106             (L<XML::EPP::DCP>) describes "the server's privacy policy for data
107             collection and management".
108              
109             =back
110              
111             =head1 SEE ALSO
112              
113             L<XML::EPP>, L<XML::EPP::Response>, L<XML::EPP::DCP>
114              
115             =head1 AUTHOR AND LICENSE
116              
117             Development commissioned by NZ Registry Services, and carried out by
118             Catalyst IT - L<http://www.catalyst.net.nz/>
119              
120             Copyright 2009, 2010, NZ Registry Services. This module is licensed
121             under the Artistic License v2.0, which permits relicensing under other
122             Free Software licenses.
123              
124             =cut
125