Contacts/Type/Email.pm

filter: Statementstmt 89.2% 25 / 28 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod n/a totaltotal 83.7% 31 / 37 CC 2 SCAR 8.1
CC
2
Cov
83%
__ANON__
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Contacts/Type/PostalAddress.pm ↑ Summary Contacts/Type/When.pm »
1 package WWW::Google::Contacts::Type::Email;
2 {
3 19 $WWW::Google::Contacts::Type::Email::VERSION = '0.39';
4 }
5  
6 19 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 19 ▶use MooseX::Types::Moose qw( Str Undef );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 19 ▶use WWW::Google::Contacts::InternalTypes qw( Rel XmlBool );
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 home other )],
15 default_type => 'work',
16 };
17  
18 19 has value => (
19 isa => Str,
20 is => 'rw',
21 traits => ['XmlField'],
22 xml_key => 'address',
23 predicate => 'has_value',
24 required => 1,
25 );
26  
27 19 has display_name => (
28 isa => Str,
29 is => 'rw',
30 traits => ['XmlField'],
31 xml_key => 'displayName',
32 predicate => 'has_display_name',
33 );
34  
35 has primary => (
36 isa => XmlBool,
37 is => 'rw',
38 traits => ['XmlField'],
39 predicate => 'has_primary',
40 xml_key => 'primary',
41 to_xml =>
42 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
43 2 ▶ default => sub { 0 },
Subroutine __ANON__: called CC=1 SCAR=0.0
44 19 coerce => 1,
45 );
46  
47 19 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
48 19 __PACKAGE__->meta->make_immutable;
49 19 1;
50 __END__
« Contacts/Type/PostalAddress.pm ↑ Summary Contacts/Type/When.pm »