File: | lib/WWW/Google/Contacts/Type/Relation.pm |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package WWW::Google::Contacts::Type::Relation; | ||||||
2 | |||||||
3 | 12 12 12 | 96 38 96 | use Moose; | ||||
4 | 12 12 12 | 141 41 105 | use MooseX::Types::Moose qw( Str ); | ||||
5 | 12 12 12 | 137 37 97 | use WWW::Google::Contacts::InternalTypes qw( Rel ); | ||||
6 | 12 12 12 | 122 38 96 | use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField; | ||||
7 | |||||||
8 | extends 'WWW::Google::Contacts::Type::Base'; | ||||||
9 | |||||||
10 | has type => ( | ||||||
11 | isa => Str, # not a full url rel :-/ | ||||||
12 | is => 'rw', | ||||||
13 | traits => [ 'XmlField' ], | ||||||
14 | xml_key => 'rel', | ||||||
15 | predicate => 'has_type', | ||||||
16 | required => 1, | ||||||
17 | ); | ||||||
18 | |||||||
19 | has value => ( | ||||||
20 | isa => Str, | ||||||
21 | is => 'rw', | ||||||
22 | traits => [ 'XmlField' ], | ||||||
23 | xml_key => 'content', | ||||||
24 | predicate => 'has_value', | ||||||
25 | required => 1, | ||||||
26 | ); | ||||||
27 | |||||||
28 | 12 12 12 | 112 39 92 | no Moose; | ||||
29 | __PACKAGE__->meta->make_immutable; | ||||||
30 | 1; |