File Coverage

blib/lib/WWW/Google/Contacts/Type/CalendarLink.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             package WWW::Google::Contacts::Type::CalendarLink;
2             {
3             $WWW::Google::Contacts::Type::CalendarLink::VERSION = '0.39';
4             }
5              
6 19     19   188 use Moose;
  19         40  
  19         155  
7 19     19   126879 use MooseX::Types::Moose qw( Str );
  19         45  
  19         230  
8 19     19   99190 use WWW::Google::Contacts::InternalTypes qw( Rel XmlBool );
  19         45  
  19         176  
9 19     19   51173 use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField;
  19         41  
  19         3857  
10              
11             extends 'WWW::Google::Contacts::Type::Base';
12              
13             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             has label => (
22             isa => Str,
23             is => 'rw',
24             traits => ['XmlField'],
25             xml_key => 'label',
26             predicate => 'has_label',
27             );
28              
29             has href => (
30             isa => Str,
31             is => 'rw',
32             traits => ['XmlField'],
33             xml_key => 'href',
34             predicate => 'has_href',
35             );
36              
37             has primary => (
38             isa => XmlBool,
39             is => 'rw',
40             traits => ['XmlField'],
41             predicate => 'has_primary',
42             xml_key => 'primary',
43             to_xml =>
44             sub { my $val = shift; return "true" if $val == 1; return "false" },
45             default => sub { 0 },
46             coerce => 1,
47             );
48              
49 19     19   135 no Moose;
  19         50  
  19         119  
50             __PACKAGE__->meta->make_immutable;
51             1;
52             __END__