| 1 | package WWW::Google::Contacts::Types; | ||||||||||||
| 2 | { | ||||||||||||
| 3 | 19 | $WWW::Google::Contacts::Types::VERSION = '0.39'; | |||||||||||
| 4 | } | ||||||||||||
| 5 | |||||||||||||
| 6 | 19 | ▶ | use MooseX::Types -declare => [ | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | qw( | ||||||||||||
| 8 | Category | ||||||||||||
| 9 | Name | ||||||||||||
| 10 | PhoneNumber ArrayRefOfPhoneNumber | ||||||||||||
| 11 | Email ArrayRefOfEmail | ||||||||||||
| 12 | IM ArrayRefOfIM | ||||||||||||
| 13 | Organization ArrayRefOfOrganization | ||||||||||||
| 14 | PostalAddress ArrayRefOfPostalAddress | ||||||||||||
| 15 | CalendarLink ArrayRefOfCalendarLink | ||||||||||||
| 16 | Birthday | ||||||||||||
| 17 | ContactEvent ArrayRefOfContactEvent | ||||||||||||
| 18 | ExternalId ArrayRefOfExternalId | ||||||||||||
| 19 | Gender | ||||||||||||
| 20 | GroupMembership ArrayRefOfGroupMembership | ||||||||||||
| 21 | Hobby ArrayRefOfHobby | ||||||||||||
| 22 | Jot ArrayRefOfJot | ||||||||||||
| 23 | Language ArrayRefOfLanguage | ||||||||||||
| 24 | Priority | ||||||||||||
| 25 | Sensitivity | ||||||||||||
| 26 | Relation ArrayRefOfRelation | ||||||||||||
| 27 | UserDefined ArrayRefOfUserDefined | ||||||||||||
| 28 | Website ArrayRefOfWebsite | ||||||||||||
| 29 | Photo | ||||||||||||
| 30 | Group | ||||||||||||
| 31 | ) | ||||||||||||
| 32 | 19 | ]; | |||||||||||
| 33 | |||||||||||||
| 34 | 19 | ▶ | use MooseX::Types::Moose qw(Str HashRef ArrayRef Any Undef Bool); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 35 | |||||||||||||
| 36 | 19 | ▶ | use WWW::Google::Contacts::Type::Category; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 37 | 19 | ▶ | use WWW::Google::Contacts::Type::Name; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 38 | 19 | ▶ | use WWW::Google::Contacts::Type::PhoneNumber; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 39 | 19 | ▶ | use WWW::Google::Contacts::Type::PhoneNumber; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 40 | 19 | ▶ | use WWW::Google::Contacts::Type::Email; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 41 | 19 | ▶ | use WWW::Google::Contacts::Type::Email; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 42 | 19 | ▶ | use WWW::Google::Contacts::Type::IM; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 43 | 19 | ▶ | use WWW::Google::Contacts::Type::Organization; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 44 | 19 | ▶ | use WWW::Google::Contacts::Type::PostalAddress; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 45 | 19 | ▶ | use WWW::Google::Contacts::Type::Birthday; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 46 | 19 | ▶ | use WWW::Google::Contacts::Type::CalendarLink; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 47 | |||||||||||||
| 48 | 19 | ▶ | use WWW::Google::Contacts::Type::ContactEvent; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 49 | 19 | ▶ | use WWW::Google::Contacts::Type::ExternalId; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 50 | 19 | ▶ | use WWW::Google::Contacts::Type::Gender; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 51 | 19 | ▶ | use WWW::Google::Contacts::Type::GroupMembership; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 52 | 19 | ▶ | use WWW::Google::Contacts::Type::Hobby; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 53 | 19 | ▶ | use WWW::Google::Contacts::Type::Jot; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 54 | 19 | ▶ | use WWW::Google::Contacts::Type::Language; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 55 | 19 | ▶ | use WWW::Google::Contacts::Type::Priority; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 56 | 19 | ▶ | use WWW::Google::Contacts::Type::Relation; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 57 | 19 | ▶ | use WWW::Google::Contacts::Type::UserDefined; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | 19 | ▶ | use WWW::Google::Contacts::Type::Website; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 59 | 19 | ▶ | use WWW::Google::Contacts::Type::Sensitivity; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 60 | |||||||||||||
| 61 | 19 | class_type Group, { class => 'WWW::Google::Contacts::Group' }; | |||||||||||
| 62 | |||||||||||||
| 63 | 0 | ▶ | coerce Group, from HashRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 64 | 0 | require WWW::Google::Contacts::Group; | |||||||||||
| 65 | 0 | WWW::Google::Contacts::Group->new($_) | |||||||||||
| 66 | 19 | }; | |||||||||||
| 67 | |||||||||||||
| 68 | 19 | class_type Category, { class => 'WWW::Google::Contacts::Type::Category' }; | |||||||||||
| 69 | |||||||||||||
| 70 | 3 | ▶ | coerce Category, from Any, via { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 71 | 3 | WWW::Google::Contacts::Type::Category->new( | |||||||||||
| 72 | type => 'http://schemas.google.com/g/2005#kind', | ||||||||||||
| 73 | term => 'http://schemas.google.com/contact/2008#contact' | ||||||||||||
| 74 | ); | ||||||||||||
| 75 | 19 | }; | |||||||||||
| 76 | |||||||||||||
| 77 | 19 | class_type Name, { class => 'WWW::Google::Contacts::Type::Name' }; | |||||||||||
| 78 | |||||||||||||
| 79 | coerce Name, | ||||||||||||
| 80 | from Str, | ||||||||||||
| 81 | 0 | ▶ | via { WWW::Google::Contacts::Type::Name->new( full_name => $_ ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 82 | from Any, | ||||||||||||
| 83 | 5 | ▶ | via { WWW::Google::Contacts::Type::Name->new( $_ || {} ) }; | ||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
Condition100%2/2
$_ || {}
MC/DC100%1/1
$_ || {}
$_
Truth table100%2/2
A
A= $_
| |||||||||||||
| 84 | |||||||||||||
| 85 | 19 | class_type PhoneNumber, { class => 'WWW::Google::Contacts::Type::PhoneNumber' }; | |||||||||||
| 86 | |||||||||||||
| 87 | coerce PhoneNumber, | ||||||||||||
| 88 | from HashRef, | ||||||||||||
| 89 | 1 | ▶ | via { WWW::Google::Contacts::Type::PhoneNumber->new($_) }, | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 90 | from Str, | ||||||||||||
| 91 | 6 | ▶ | via { WWW::Google::Contacts::Type::PhoneNumber->new( value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 92 | |||||||||||||
| 93 | 19 | subtype ArrayRefOfPhoneNumber, as ArrayRef [PhoneNumber]; | |||||||||||
| 94 | |||||||||||||
| 95 | 1 | ▶ | coerce ArrayRefOfPhoneNumber, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 96 | 1 | return [ map { to_PhoneNumber($_) } @{$_} ] | |||||||||||
| 97 | 2 | ▶ | }, from Any, via { return [ to_PhoneNumber($_) ] }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 98 | |||||||||||||
| 99 | 19 | class_type Email, { class => 'WWW::Google::Contacts::Type::Email' }; | |||||||||||
| 100 | |||||||||||||
| 101 | coerce Email, | ||||||||||||
| 102 | from HashRef, | ||||||||||||
| 103 | 0 | ▶ | via { WWW::Google::Contacts::Type::Email->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 104 | from Str, | ||||||||||||
| 105 | 2 | ▶ | via { WWW::Google::Contacts::Type::Email->new( value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 106 | |||||||||||||
| 107 | 19 | subtype ArrayRefOfEmail, as ArrayRef [Email]; | |||||||||||
| 108 | |||||||||||||
| 109 | 0 | ▶ | coerce ArrayRefOfEmail, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 110 | 0 | [ map { to_Email($_) } @{$_} ] | |||||||||||
| 111 | 1 | ▶ | }, from Any, via { [ to_Email($_) ] }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 112 | |||||||||||||
| 113 | 19 | class_type IM, { class => 'WWW::Google::Contacts::Type::IM' }; | |||||||||||
| 114 | |||||||||||||
| 115 | coerce IM, | ||||||||||||
| 116 | from HashRef, | ||||||||||||
| 117 | 0 | ▶ | via { WWW::Google::Contacts::Type::IM->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 118 | from Str, | ||||||||||||
| 119 | 0 | ▶ | via { WWW::Google::Contacts::Type::IM->new( value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 120 | |||||||||||||
| 121 | 19 | subtype ArrayRefOfIM, as ArrayRef [IM]; | |||||||||||
| 122 | |||||||||||||
| 123 | 0 | ▶ | coerce ArrayRefOfIM, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 124 | 0 | [ map { to_IM($_) } @{$_} ] | |||||||||||
| 125 | 0 | ▶ | }, from Any, via { [ to_IM($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 126 | |||||||||||||
| 127 | 19 | class_type Organization, | |||||||||||
| 128 | { class => 'WWW::Google::Contacts::Type::Organization' }; | ||||||||||||
| 129 | |||||||||||||
| 130 | coerce Organization, | ||||||||||||
| 131 | from HashRef, | ||||||||||||
| 132 | 0 | ▶ | via { WWW::Google::Contacts::Type::Organization->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 133 | from Str, | ||||||||||||
| 134 | 0 | ▶ | via { WWW::Google::Contacts::Type::Organization->new( name => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 135 | |||||||||||||
| 136 | 19 | subtype ArrayRefOfOrganization, as ArrayRef [Organization]; | |||||||||||
| 137 | |||||||||||||
| 138 | 0 | ▶ | coerce ArrayRefOfOrganization, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 139 | 0 | [ map { to_Organization($_) } @{$_} ] | |||||||||||
| 140 | 0 | ▶ | }, from Any, via { [ to_Organization($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 141 | |||||||||||||
| 142 | 19 | class_type PostalAddress, | |||||||||||
| 143 | { class => 'WWW::Google::Contacts::Type::PostalAddress' }; | ||||||||||||
| 144 | |||||||||||||
| 145 | coerce PostalAddress, | ||||||||||||
| 146 | from HashRef, | ||||||||||||
| 147 | 0 | ▶ | via { WWW::Google::Contacts::Type::PostalAddress->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 148 | from Str, | ||||||||||||
| 149 | 0 | ▶ | via { WWW::Google::Contacts::Type::PostalAddress->new( formatted => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 150 | |||||||||||||
| 151 | 19 | subtype ArrayRefOfPostalAddress, as ArrayRef [PostalAddress]; | |||||||||||
| 152 | |||||||||||||
| 153 | 0 | ▶ | coerce ArrayRefOfPostalAddress, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 154 | 0 | [ map { to_PostalAddress($_) } @{$_} ] | |||||||||||
| 155 | 0 | ▶ | }, from Any, via { [ to_PostalAddress($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 156 | |||||||||||||
| 157 | 19 | class_type Birthday, { class => 'WWW::Google::Contacts::Type::Birthday' }; | |||||||||||
| 158 | |||||||||||||
| 159 | coerce Birthday, | ||||||||||||
| 160 | from Str, | ||||||||||||
| 161 | 0 | ▶ | via { WWW::Google::Contacts::Type::Birthday->new( when => $_ ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 162 | from HashRef, | ||||||||||||
| 163 | 0 | ▶ | via { WWW::Google::Contacts::Type::Birthday->new($_) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 164 | |||||||||||||
| 165 | 19 | class_type CalendarLink, | |||||||||||
| 166 | { class => 'WWW::Google::Contacts::Type::CalendarLink' }; | ||||||||||||
| 167 | |||||||||||||
| 168 | coerce CalendarLink, | ||||||||||||
| 169 | from HashRef, | ||||||||||||
| 170 | 0 | ▶ | via { WWW::Google::Contacts::Type::CalendarLink->new($_) }, from Str, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 171 | 0 | WWW::Google::Contacts::Type::CalendarLink->new( | |||||||||||
| 172 | type => "home", | ||||||||||||
| 173 | href => $_ | ||||||||||||
| 174 | ) | ||||||||||||
| 175 | 19 | }; | |||||||||||
| 176 | |||||||||||||
| 177 | 19 | subtype ArrayRefOfCalendarLink, as ArrayRef [CalendarLink]; | |||||||||||
| 178 | |||||||||||||
| 179 | 0 | ▶ | coerce ArrayRefOfCalendarLink, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 180 | 0 | [ map { to_CalendarLink($_) } @{$_} ] | |||||||||||
| 181 | 0 | ▶ | }, from Any, via { [ to_CalendarLink($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 182 | |||||||||||||
| 183 | 19 | class_type ContactEvent, | |||||||||||
| 184 | { class => 'WWW::Google::Contacts::Type::ContactEvent' }; | ||||||||||||
| 185 | |||||||||||||
| 186 | coerce ContactEvent, | ||||||||||||
| 187 | from HashRef, | ||||||||||||
| 188 | 0 | ▶ | via { WWW::Google::Contacts::Type::ContactEvent->new($_) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 189 | |||||||||||||
| 190 | 19 | subtype ArrayRefOfContactEvent, as ArrayRef [ContactEvent]; | |||||||||||
| 191 | |||||||||||||
| 192 | 0 | ▶ | coerce ArrayRefOfContactEvent, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 193 | 0 | [ map { to_ContactEvent($_) } @{$_} ] | |||||||||||
| 194 | 0 | ▶ | }, from Any, via { [ to_ContactEvent($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 195 | |||||||||||||
| 196 | 19 | class_type ExternalId, { class => 'WWW::Google::Contacts::Type::ExternalId' }; | |||||||||||
| 197 | |||||||||||||
| 198 | coerce ExternalId, | ||||||||||||
| 199 | from HashRef, | ||||||||||||
| 200 | 0 | ▶ | via { WWW::Google::Contacts::Type::ExternalId->new($_) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 201 | |||||||||||||
| 202 | 19 | subtype ArrayRefOfExternalId, as ArrayRef [ExternalId]; | |||||||||||
| 203 | |||||||||||||
| 204 | 0 | ▶ | coerce ArrayRefOfExternalId, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 205 | 0 | [ map { to_ExternalId($_) } @{$_} ] | |||||||||||
| 206 | 0 | ▶ | }, from Any, via { [ to_ExternalId($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 207 | |||||||||||||
| 208 | 19 | class_type Gender, { class => 'WWW::Google::Contacts::Type::Gender' }; | |||||||||||
| 209 | |||||||||||||
| 210 | coerce Gender, | ||||||||||||
| 211 | from Str, | ||||||||||||
| 212 | 0 | ▶ | via { WWW::Google::Contacts::Type::Gender->new( value => $_ ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 213 | from HashRef, | ||||||||||||
| 214 | 0 | ▶ | via { WWW::Google::Contacts::Type::Gender->new($_) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 215 | |||||||||||||
| 216 | 19 | class_type GroupMembership, | |||||||||||
| 217 | { class => 'WWW::Google::Contacts::Type::GroupMembership' }; | ||||||||||||
| 218 | |||||||||||||
| 219 | coerce GroupMembership, | ||||||||||||
| 220 | from HashRef, | ||||||||||||
| 221 | 0 | ▶ | via { WWW::Google::Contacts::Type::GroupMembership->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 222 | from Str, | ||||||||||||
| 223 | 0 | ▶ | via { WWW::Google::Contacts::Type::GroupMembership->new( href => $_ ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 224 | from Group, | ||||||||||||
| 225 | 0 | ▶ | via { WWW::Google::Contacts::Type::GroupMembership->new( href => $_->id ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 226 | |||||||||||||
| 227 | 19 | subtype ArrayRefOfGroupMembership, as ArrayRef [GroupMembership]; | |||||||||||
| 228 | |||||||||||||
| 229 | 0 | ▶ | coerce ArrayRefOfGroupMembership, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 230 | 0 | [ map { to_GroupMembership($_) } @{$_} ] | |||||||||||
| 231 | 0 | ▶ | }, from Any, via { [ to_GroupMembership($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 232 | |||||||||||||
| 233 | 19 | class_type Hobby, { class => 'WWW::Google::Contacts::Type::Hobby' }; | |||||||||||
| 234 | |||||||||||||
| 235 | coerce Hobby, | ||||||||||||
| 236 | from HashRef, | ||||||||||||
| 237 | 0 | ▶ | via { WWW::Google::Contacts::Type::Hobby->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 238 | from Str, | ||||||||||||
| 239 | 0 | ▶ | via { WWW::Google::Contacts::Type::Hobby->new( value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 240 | |||||||||||||
| 241 | 19 | subtype ArrayRefOfHobby, as ArrayRef [Hobby]; | |||||||||||
| 242 | |||||||||||||
| 243 | 0 | ▶ | coerce ArrayRefOfHobby, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 244 | 0 | [ map { to_Hobby($_) } @{$_} ] | |||||||||||
| 245 | 0 | ▶ | }, from Any, via { [ to_Hobby($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 246 | |||||||||||||
| 247 | 19 | class_type Jot, { class => 'WWW::Google::Contacts::Type::Jot' }; | |||||||||||
| 248 | |||||||||||||
| 249 | coerce Jot, | ||||||||||||
| 250 | from HashRef, | ||||||||||||
| 251 | 0 | ▶ | via { WWW::Google::Contacts::Type::Jot->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 252 | from Str, | ||||||||||||
| 253 | 0 | ▶ | via { WWW::Google::Contacts::Type::Jot->new( type => "home", value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 254 | |||||||||||||
| 255 | 19 | subtype ArrayRefOfJot, as ArrayRef [Jot]; | |||||||||||
| 256 | |||||||||||||
| 257 | 0 | ▶ | coerce ArrayRefOfJot, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 258 | 0 | [ map { to_Jot($_) } @{$_} ] | |||||||||||
| 259 | 0 | ▶ | }, from Any, via { [ to_Jot($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 260 | |||||||||||||
| 261 | 19 | class_type Language, { class => 'WWW::Google::Contacts::Type::Language' }; | |||||||||||
| 262 | |||||||||||||
| 263 | coerce Language, | ||||||||||||
| 264 | from HashRef, | ||||||||||||
| 265 | 0 | ▶ | via { WWW::Google::Contacts::Type::Language->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 266 | from Str, | ||||||||||||
| 267 | 0 | ▶ | via { WWW::Google::Contacts::Type::Language->new( value => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 268 | |||||||||||||
| 269 | 19 | subtype ArrayRefOfLanguage, as ArrayRef [Language]; | |||||||||||
| 270 | |||||||||||||
| 271 | 0 | ▶ | coerce ArrayRefOfLanguage, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 272 | 0 | [ map { to_Language($_) } @{$_} ] | |||||||||||
| 273 | 0 | ▶ | }, from Any, via { [ to_Language($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 274 | |||||||||||||
| 275 | 19 | class_type Priority, { class => 'WWW::Google::Contacts::Type::Priority' }; | |||||||||||
| 276 | |||||||||||||
| 277 | coerce Priority, | ||||||||||||
| 278 | from Str, | ||||||||||||
| 279 | 0 | ▶ | via { WWW::Google::Contacts::Type::Priority->new( type => $_ ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 280 | from Undef, | ||||||||||||
| 281 | 0 | ▶ | via { WWW::Google::Contacts::Type::Priority->new( type => "normal" ) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 282 | from HashRef, | ||||||||||||
| 283 | 0 | ▶ | via { WWW::Google::Contacts::Type::Priority->new( type => $_->{rel} ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 284 | |||||||||||||
| 285 | 19 | class_type Relation, { class => 'WWW::Google::Contacts::Type::Relation' }; | |||||||||||
| 286 | |||||||||||||
| 287 | coerce Relation, | ||||||||||||
| 288 | from HashRef, | ||||||||||||
| 289 | 0 | ▶ | via { WWW::Google::Contacts::Type::Relation->new($_) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 290 | |||||||||||||
| 291 | 19 | subtype ArrayRefOfRelation, as ArrayRef [Relation]; | |||||||||||
| 292 | |||||||||||||
| 293 | 0 | ▶ | coerce ArrayRefOfRelation, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 294 | 0 | [ map { to_Relation($_) } @{$_} ] | |||||||||||
| 295 | 0 | ▶ | }, from Any, via { [ to_Relation($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 296 | |||||||||||||
| 297 | 19 | class_type UserDefined, { class => 'WWW::Google::Contacts::Type::UserDefined' }; | |||||||||||
| 298 | |||||||||||||
| 299 | coerce UserDefined, | ||||||||||||
| 300 | from HashRef, | ||||||||||||
| 301 | 5 | ▶ | via { WWW::Google::Contacts::Type::UserDefined->new($_) }; | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 302 | |||||||||||||
| 303 | 19 | subtype ArrayRefOfUserDefined, as ArrayRef [UserDefined]; | |||||||||||
| 304 | |||||||||||||
| 305 | 1 | ▶ | coerce ArrayRefOfUserDefined, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 306 | 1 | [ map { to_UserDefined($_) } @{$_} ] | |||||||||||
| 307 | 1 | ▶ | }, from HashRef, via { | ||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||||
| 308 | 1 | my $ref = $_; | |||||||||||
| 309 | 1 | ▶ | return [ to_UserDefined($ref) ] if ( defined $ref->{key} ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 310 | 2 | [ map { to_UserDefined( { key => $_, value => $ref->{$_}{value} } ) } | |||||||||||
| 311 | 1 | keys %{$ref} ] | |||||||||||
| 312 | 0 | ▶ | }, from Any, via { [ to_UserDefined($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 313 | |||||||||||||
| 314 | 19 | class_type Website, { class => 'WWW::Google::Contacts::Type::Website' }; | |||||||||||
| 315 | |||||||||||||
| 316 | coerce Website, | ||||||||||||
| 317 | from HashRef, | ||||||||||||
| 318 | 0 | ▶ | via { WWW::Google::Contacts::Type::Website->new($_) }, from Str, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 319 | 0 | WWW::Google::Contacts::Type::Website->new( type => "home", value => $_ ) | |||||||||||
| 320 | 19 | }; | |||||||||||
| 321 | |||||||||||||
| 322 | 19 | subtype ArrayRefOfWebsite, as ArrayRef [Website]; | |||||||||||
| 323 | |||||||||||||
| 324 | 0 | ▶ | coerce ArrayRefOfWebsite, from ArrayRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 325 | 0 | [ map { to_Website($_) } @{$_} ] | |||||||||||
| 326 | 0 | ▶ | }, from Any, via { [ to_Website($_) ] }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 327 | |||||||||||||
| 328 | 19 | class_type Sensitivity, { class => 'WWW::Google::Contacts::Type::Sensitivity' }; | |||||||||||
| 329 | |||||||||||||
| 330 | coerce Sensitivity, | ||||||||||||
| 331 | from HashRef, | ||||||||||||
| 332 | 0 | ▶ | via { WWW::Google::Contacts::Type::Sensitivity->new($_) }, | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 333 | from Str, | ||||||||||||
| 334 | 0 | ▶ | via { WWW::Google::Contacts::Type::Sensitivity->new( type => $_ ) }; | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||
| 335 | |||||||||||||
| 336 | 19 | class_type Photo, { class => 'WWW::Google::Contacts::Photo' }; | |||||||||||
| 337 | |||||||||||||
| 338 | 0 | ▶ | coerce Photo, from HashRef, via { | ||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||
| 339 | 0 | require WWW::Google::Contacts::Photo; | |||||||||||
| 340 | 0 | WWW::Google::Contacts::Photo->new($_) | |||||||||||
| 341 | 19 | }; | |||||||||||