Contacts/Type/Organization.pm

filter: Statementstmt 87.5% 28 / 32 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod n/a totaltotal 80.4% 33 / 41 CC 2 SCAR 8.6
CC
2
Cov
82%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.4
« Contacts/Type/Website.pm ↑ Summary Contacts/Type/PostalAddress.pm »
1 package WWW::Google::Contacts::Type::Organization;
2 {
3 19 $WWW::Google::Contacts::Type::Organization::VERSION = '0.38';
4 }
5  
6 19 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 19 ▶use MooseX::Types::Moose qw( Str );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 19 ▶use WWW::Google::Contacts::InternalTypes qw( Rel XmlBool Where );
Subroutine BEGIN: called CC=1 SCAR=0.0
9 19 ▶use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 19 extends 'WWW::Google::Contacts::Type::Base';
12  
13 19 with 'WWW::Google::Contacts::Roles::HasTypeAndLabel' => {
14 valid_types => [qw( work other )],
15 default_type => 'work',
16 };
17  
18 19 has department => (
19 isa => Str,
20 is => 'rw',
21 traits => ['XmlField'],
22 xml_key => 'gd:orgDepartment',
23 predicate => 'has_department',
24 is_element => 1,
25 );
26  
27 19 has job_description => (
28 isa => Str,
29 is => 'rw',
30 traits => ['XmlField'],
31 xml_key => 'gd:orgJobDescription',
32 predicate => 'has_job_description',
33 is_element => 1,
34 );
35  
36 19 has name => (
37 isa => Str,
38 is => 'rw',
39 traits => ['XmlField'],
40 xml_key => 'gd:orgName',
41 predicate => 'has_name',
42 is_element => 1,
43 );
44  
45 19 has symbol => (
46 isa => Str,
47 is => 'rw',
48 traits => ['XmlField'],
49 xml_key => 'gd:orgSymbol',
50 predicate => 'has_symbol',
51 is_element => 1,
52 );
53  
54 19 has title => (
55 isa => Str,
56 is => 'rw',
57 traits => ['XmlField'],
58 xml_key => 'gd:orgTitle',
59 predicate => 'has_title',
60 is_element => 1,
61 );
62  
63 has primary => (
64 isa => XmlBool,
65 is => 'rw',
66 traits => ['XmlField'],
67 predicate => 'has_primary',
68 xml_key => 'primary',
69 to_xml =>
70 0 ▶ sub { my $val = shift; return "true" if $val == 1; return "false" },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
if $val == 1 0 0 0
71 0 ▶ default => sub { 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
72 19 coerce => 1,
73 );
74  
75 19 has where => (
76 isa => Where,
77 is => 'rw',
78 traits => ['XmlField'],
79 xml_key => 'gd:where',
80 predicate => 'has_where',
81 is_element => 1,
82 coerce => 1,
83 );
84  
85 19 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
86 19 __PACKAGE__->meta->make_immutable;
87 19 1;
88 __END__
« Contacts/Type/Website.pm ↑ Summary Contacts/Type/PostalAddress.pm »