Contacts/Type/Website.pm

filter: Statementstmt 85.7% 24 / 28 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod n/a totaltotal 78.3% 29 / 37 CC 2 SCAR 8.6
CC
2
Cov
80%
__ANON__
6.0
__ANON__
2.0
BEGIN
1.0
CRAP 2.4
« Contacts/Type/CalendarLink.pm ↑ Summary Contacts/Type/Organization.pm »
1 package WWW::Google::Contacts::Type::Website;
2 {
3 19 $WWW::Google::Contacts::Type::Website::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 );
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 has type => (
14 isa => Str, # not a full url rel :-/
15 is => 'rw',
16 traits => ['XmlField'],
17 xml_key => 'rel',
18 predicate => 'has_type',
19 );
20  
21 19 has value => (
22 isa => Str,
23 is => 'rw',
24 traits => ['XmlField'],
25 xml_key => 'href',
26 predicate => 'has_value',
27 required => 1,
28 );
29  
30 19 has label => (
31 isa => Str,
32 is => 'rw',
33 traits => ['XmlField'],
34 xml_key => 'label',
35 predicate => 'has_label',
36 );
37  
38 has primary => (
39 isa => XmlBool,
40 is => 'rw',
41 traits => ['XmlField'],
42 predicate => 'has_primary',
43 xml_key => 'primary',
44 to_xml =>
45 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
46 0 ▶ default => sub { 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
47 19 coerce => 1,
48 );
49  
50 19 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
51 19 __PACKAGE__->meta->make_immutable;
52 19 1;
53 __END__
« Contacts/Type/CalendarLink.pm ↑ Summary Contacts/Type/Organization.pm »