SRS/Contact.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/Handle/Query.pm ↑ Summary SRS/Contact/Filter.pm »
1  
2 package XML::SRS::Contact;
3 1 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 $XML::SRS::Contact::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 use XML::SRS::Types;
12  
13 # handles
14 has_attr 'handle_id' =>
15 is => "ro",
16 isa => "XML::SRS::HandleId",
17 xml_name => "HandleId",
18 predicate => "has_handle_id",
19 ;
20  
21 has_attr 'action_id' =>
22 is => "rw",
23 isa => "XML::SRS::UID",
24 xml_name => 'ActionId',
25 xml_required => 0,
26 predicate => "has_action_id",
27 ;
28  
29 # attributes
30 has_attr 'name' =>
31 is => "ro",
32 isa => "Str",
33 xml_name => "Name",
34 predicate => "has_name",
35 ;
36  
37 has_attr 'email' =>
38 is => "ro",
39 isa => "XML::SRS::Email",
40 xml_name => "Email",
41 predicate => "has_email",
42 ;
43  
44 # elements
45 has_element 'address' =>
46 is => "ro",
47 isa => "XML::SRS::Contact::Address",
48 xml_nodeName => "PostalAddress",
49 predicate => "has_address",
50 coerce => 1,
51 xml_required => 0,
52 ;
53  
54 has_element 'phone' =>
55 is => "ro",
56 isa => "XML::SRS::Contact::PSTN",
57 predicate => "has_phone",
58 xml_nodeName => "Phone",
59 coerce => 1,
60 xml_required => 0,
61 ;
62  
63 has_element 'fax' =>
64 is => "ro",
65 isa => "XML::SRS::Contact::PSTN",
66 predicate => "has_fax",
67 xml_nodeName => "Fax",
68 coerce => 1,
69 xml_required => 0,
70 ;
71  
72 with 'XML::SRS::Node';
73  
74 use Moose::Util::TypeConstraints;
75 coerce __PACKAGE__
76 => from "HashRef"
77 => via { __PACKAGE__->new(%$_); };
78
79 1;
80  
81 __END__
« SRS/Handle/Query.pm ↑ Summary SRS/Contact/Filter.pm »