I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2012-06-13 13:59:57.106624-07 by threecee
Perl Google Contacts: how can i create and modify user-defined contact fields?
i've been working with your most-excellent module (thanks!), but i'm having trouble figuring out how to *create* user-defined fields.

i'm not a perl expert, so this may be more of a perl question than a specific module question.

i can't seem to figure out how to create a user-defined field for a contact. any help is appreciated!!

i'm not at all clear on how to use an accessor, but i've managed to figure out how to modify a preexisting user-defined field like this:

my $google = WWW::Google::Contacts->new( username => $username, password => $password ); my $contacts = $google->contacts; while ( my $contact = $contacts->next ) { my @userDefinedFields = $contact->user_defined ; foreach my $userDefinedObject (@userDefinedFields) { if (defined $userDefinedObject) { $$userDefinedObject[0]{'key'} = "user defined key" ; $$userDefinedObject[0]{'value'} = "user defined value" ; } } $contact->update; }


how do i create a user-defined field?

thanks!!
Direct Responses: Write a response