| 1 | package WWW::Google::Contacts::Type::Email; | ||||||||||
| 2 | { | ||||||||||
| 3 | 19 | $WWW::Google::Contacts::Type::Email::VERSION = '0.38'; | |||||||||
| 4 | } | ||||||||||
| 5 | |||||||||||
| 6 | 19 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 19 | ▶ | use MooseX::Types::Moose qw( Str Undef ); | ||||||||
|
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 | with 'WWW::Google::Contacts::Roles::HasTypeAndLabel' => { | |||||||||
| 14 | valid_types => [qw( work home other )], | ||||||||||
| 15 | default_type => 'work', | ||||||||||
| 16 | }; | ||||||||||
| 17 | |||||||||||
| 18 | 19 | has value => ( | |||||||||
| 19 | isa => Str, | ||||||||||
| 20 | is => 'rw', | ||||||||||
| 21 | traits => ['XmlField'], | ||||||||||
| 22 | xml_key => 'address', | ||||||||||
| 23 | predicate => 'has_value', | ||||||||||
| 24 | required => 1, | ||||||||||
| 25 | ); | ||||||||||
| 26 | |||||||||||
| 27 | 19 | has display_name => ( | |||||||||
| 28 | isa => Str, | ||||||||||
| 29 | is => 'rw', | ||||||||||
| 30 | traits => ['XmlField'], | ||||||||||
| 31 | xml_key => 'displayName', | ||||||||||
| 32 | predicate => 'has_display_name', | ||||||||||
| 33 | ); | ||||||||||
| 34 | |||||||||||
| 35 | has primary => ( | ||||||||||
| 36 | isa => XmlBool, | ||||||||||
| 37 | is => 'rw', | ||||||||||
| 38 | traits => ['XmlField'], | ||||||||||
| 39 | predicate => 'has_primary', | ||||||||||
| 40 | xml_key => 'primary', | ||||||||||
| 41 | to_xml => | ||||||||||
| 42 | 0 | ▶ | sub { my $val = shift; return "true" if $val == 1; return "false" }, | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 43 | 2 | ▶ | default => sub { 0 }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 44 | 19 | coerce => 1, | |||||||||
| 45 | ); | ||||||||||
| 46 | |||||||||||
| 47 | 19 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 48 | 19 | __PACKAGE__->meta->make_immutable; | |||||||||
| 49 | 19 | 1; | |||||||||
| 50 | __END__ | ||||||||||