SRS/Contact/Filter.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 85.7% 12 / 14 CC 1 SCAR 0.7
CC
1
Cov
80%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« SRS/Contact.pm ↑ Summary SRS/Registrar/Update.pm »
1  
2 package XML::SRS::Contact::Filter;
3 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 $XML::SRS::Contact::Filter::VERSION = '0.09';
5 }
6  
7 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use PRANG::Graph;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 0 ▶use XML::SRS::Contact::Address;
Subroutine BEGIN: called CC=1 SCAR=2.6
10 use XML::SRS::Contact::PSTN;
11  
12 use Moose::Util::TypeConstraints;
13  
14 # attributes
15 has_attr 'name' =>
16 is => 'ro',
17 isa => 'Str',
18 xml_name => 'Name',
19 xml_required => 0,
20 ;
21  
22 has_attr 'email' =>
23 is => 'ro',
24 isa => 'Str',
25 xml_name => 'Email',
26 xml_required => 0,
27 ;
28  
29 # elements
30 has_element 'postal_address_filter' =>
31 is => 'ro',
32 isa => 'XML::SRS::Contact::Address',
33 xml_nodeName => 'PostalAddressFilter',
34 xml_required => 0,
35 coerce => 1,
36 ;
37  
38 has_element 'phone' =>
39 is => 'ro',
40 isa => 'XML::SRS::Contact::PSTN',
41 xml_nodeName => 'Phone',
42 xml_required => 0,
43 coerce => 1,
44 ;
45  
46 has_element 'fax' =>
47 is => 'ro',
48 isa => 'XML::SRS::Contact::PSTN',
49 xml_nodeName => 'Fax',
50 xml_required => 0,
51 coerce => 1,
52 ;
53  
54 coerce __PACKAGE__
55 => from 'HashRef'
56 => via {
57 __PACKAGE__->new(
58 %{$_[0]},
59 );
60 };
61  
62 sub root_element {'ContactFilter'}
63  
64 with 'XML::SRS::Node';
65  
66 1;
« SRS/Contact.pm ↑ Summary SRS/Registrar/Update.pm »