Skip Menu |

This queue is for tickets about the WWW-Google-Contacts CPAN distribution.

Report information
The Basics
Id: 60858
Status: resolved
Priority: 0/
Queue: WWW-Google-Contacts

People
Owner: Nobody in particular
Requestors: peter [...] glossop.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Multiple Phone Numbers
Date: Sun, 29 Aug 2010 17:06:14 +0100
To: bug-WWW-Google-Contacts [...] rt.cpan.org
From: Peter Collard <peter [...] glossop.org>
I don't seem to be able to get multiple entries in for phone numbers. something along the lines of:- ========================================= $contact = $google->new_contact; ... some stuff here $contact->phone_number({type => "mobile", value =>$Member->{Mobile}, } ); $contact->phone_number({type => "home", value => $Family->{Telephone}, } ); ... some stuff here $contact->create; ============================================ Results in only the second entry being accepted - ie the mobile entry is ignored - it doesnt seem to be doing an add for the second one. Ubuntu 10.04 Linux peter 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:38:40 UTC 2010 x86_64 GNU/Linux This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi WWW::Google::Contacts 0.09 Regards Peter Collard
Hey Yea, when you do a second $contact->phone_number() that will set the contacts' phone numbers to whatever you supply. Instead, you could either; - supply both numbers directly as an array: $contact->phone_number([ { type => "mobile", value => "12345" }, { type => "home", value => "666" }, ]); - or you can call "add_phone_number" when you're adding the second number. $contact->add_phone_number({ type => "home", value => "98765" }); Yes, the module badly needs more/better documentation.. :-/ cheers Magnus