| File: | lib/WWW/Google/Contacts/Type/PhoneNumber.pm |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package WWW::Google::Contacts::Type::PhoneNumber; | ||||||
| 2 | |||||||
| 3 | 12 12 12 | 91 37 108 | use Moose; | ||||
| 4 | 12 12 12 | 146 40 106 | use MooseX::Types::Moose qw( Str ); | ||||
| 5 | 12 12 12 | 126 34 96 | use WWW::Google::Contacts::InternalTypes qw( Rel ); | ||||
| 6 | 12 12 12 | 120 37 95 | 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( assistant callback car company_main fax home home_fax | ||||||
| 12 | isdn main mobile other_fax pager radio telex tty_tdd | ||||||
| 13 | work work_fax work_mobile work_pager | ||||||
| 14 | ) ], | ||||||
| 15 | }; | ||||||
| 16 | |||||||
| 17 | has value => ( | ||||||
| 18 | isa => Str, | ||||||
| 19 | is => 'rw', | ||||||
| 20 | traits => [ 'XmlField' ], | ||||||
| 21 | xml_key => 'content', | ||||||
| 22 | predicate => 'has_content', | ||||||
| 23 | required => 1, | ||||||
| 24 | ); | ||||||
| 25 | |||||||
| 26 | 12 12 12 | 119 38 94 | no Moose; | ||||
| 27 | __PACKAGE__->meta->make_immutable; | ||||||
| 28 | 1; | ||||||