| File: | lib/WWW/Google/Contacts/Type/IM.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package WWW::Google::Contacts::Type::IM; | ||||||
| 2 | |||||||
| 3 | 12 12 12 | 89 38 102 | use Moose; | ||||
| 4 | 12 12 12 | 171 39 103 | use MooseX::Types::Moose qw( Str ); | ||||
| 5 | 12 12 12 | 125 38 98 | use WWW::Google::Contacts::InternalTypes qw( Rel ); | ||||
| 6 | 12 12 12 | 119 38 94 | use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField; | ||||
| 7 | |||||||
| 8 | extends 'WWW::Google::Contacts::Type::Base'; | ||||||
| 9 | |||||||
| 10 | with 'WWW::Google::Contacts::Roles::HasTypeAndLabel' => { | ||||||
| 11 | valid_types => [ qw( work home netmeeting ) ], | ||||||
| 12 | }; | ||||||
| 13 | |||||||
| 14 | has protocol => ( | ||||||
| 15 | isa => Rel, | ||||||
| 16 | is => 'rw', | ||||||
| 17 | traits => [ 'XmlField' ], | ||||||
| 18 | xml_key => 'protocol', | ||||||
| 19 | predicate => 'has_protocol', | ||||||
| 20 | coerce => 1, | ||||||
| 21 | ); | ||||||
| 22 | |||||||
| 23 | has value => ( | ||||||
| 24 | isa => Str, | ||||||
| 25 | is => 'rw', | ||||||
| 26 | traits => [ 'XmlField' ], | ||||||
| 27 | xml_key => 'address', | ||||||
| 28 | predicate => 'has_value', | ||||||
| 29 | required => 1, | ||||||
| 30 | ); | ||||||
| 31 | |||||||
| 32 | 12 12 12 | 113 40 93 | no Moose; | ||||
| 33 | __PACKAGE__->meta->make_immutable; | ||||||
| 34 | 1; | ||||||