Hey Harvey
Sorry to hear you have more problems.
This is a slightly different issue. I couldn't replicate it exactly, but
I think I know what the problem is. I've uploaded a new version (0.30)
which could fix it. Please try it out and let me know how it goes.
cheers
Magnus
On Wed Jun 29 04:04:08 2011, hgpayne wrote:
Show quoted text> Does not seem to be fixed. used the same simple loop code and got the
> same errors after installing the latest version. I would have
> updated the DR but alas, I cannot remember my ID/password to do so.
> Strangely enough, Moose version 1.21 is installed on my system but
> it says the latest available is 1.03 (using ActivePerl's ppm). As a
> refresher:
>
> #!/usr/bin/perl
>
> use WWW::Google::Contacts;
>
> my $google = WWW::Google::Contacts->new( username => "<googleID>",
> password => "<googlePasswd>" );
>
> my $contacts = $google->contacts;
>
> while ( my $cont = $contacts->next ) {
> print "You got a friend called " . $cont->full_name . "\n";
>
> if ( $cont->photo->exists ) {
> print "And you got a photo of this friend\n";
> #$contact->photo->to_file( "/tmp/photo.jpg" );
> }
> }
>
>
> Results in
>
> Attribute (country) does not pass the type constraint
> because: Validation failed for 'Str' with value HASH(0x5e0bfa0) at
> C:/Perl64/s
> ite/lib/WWW/Google/Contacts/Types.pm line 147
> WWW::Google::Contacts::Types::__ANON__('HASH(0x5e0bb98)')
> called at C:/Perl64/lib/Moose/Meta/TypeCoercion.pm line 63
> Moose::Meta::TypeCoercion::__ANON__('HASH(0x5e0bb98)') called
> at C:/Perl64/lib/Moose/Meta/TypeCoercion.pm line 97
>
Moose::Meta::TypeCoercion::coerce('Moose::Meta::TypeCoercion=HASH(0x547e
7d8)',
Show quoted text> 'HASH(0x5e0bb98)') called at C:/Perl64/lib/Mo
> ose/Meta/TypeConstraint.pm line 90
>
Moose::Meta::TypeConstraint::coerce('Moose::Meta::TypeConstraint::Class=
HASH(0x547cee0)',
Show quoted text> 'HASH(0x5e0bb98)') called at C:/Pe
> rl64/site/lib/MooseX/Types.pm line 145
> MooseX::Types::__ANON__('HASH(0x5e0bb98)') called at
> C:/Perl64/site/lib/WWW/Google/Contacts/Types.pm line 155
> WWW::Google::Contacts::Types::__ANON__('HASH(0x5e0bb98)')
> called at C:/Perl64/lib/Moose/Meta/TypeCoercion.pm line 63
> Moose::Meta::TypeCoercion::__ANON__('HASH(0x5e0bb98)') called
> at C:/Perl64/lib/Moose/Meta/TypeCoercion.pm line 97
>
Moose::Meta::TypeCoercion::coerce('Moose::Meta::TypeCoercion=HASH(0x547e
d38)',
Show quoted text> 'HASH(0x5e0bb98)') called at C:/Perl64/lib/Mo
> ose/Meta/TypeConstraint.pm line 90
>
Moose::Meta::TypeConstraint::coerce('Moose::Meta::TypeConstraint::Parame
terizable=HASH(0x547f038)',
Show quoted text> 'HASH(0x5e0bb98)') calle
> d at C:/Perl64/site/lib/MooseX/Types/TypeDecorator.pm line 155
> eval {...} called at
> C:/Perl64/site/lib/MooseX/Types/TypeDecorator.pm line 154
>
MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HAS
H(0x5733a40)',
Show quoted text> 'HASH(0x5e0bb98)') called at accessor
> postal_address defined at
> C:/Perl64/site/lib/WWW/Google/Contacts/Contact.pm line 167
>
WWW::Google::Contacts::Contact::postal_address('WWW::Google::Contacts::C
ontact=HASH(0x5df86d8)',
Show quoted text> 'HASH(0x5e0bb98)') called a
> t C:/Perl64/site/lib/WWW/Google/Contacts/Base.pm line 80
>
WWW::Google::Contacts::Base::set_from_server('WWW::Google::Contacts::Con
tact=HASH(0x5df86d8)',
Show quoted text> 'HASH(0x5e0b128)') called at
> C:/Perl64/site/lib/WWW/Google/Contacts/Roles/List.pm line 87
>
WWW::Google::Contacts::Roles::List::next('WWW::Google::Contacts::Contact
List=HASH(0x29b120)')
Show quoted text> called at C:\Users\Harvey\Docu
> ments\Perl\gogltest.pl line 9
> at C:/Perl64/site/lib/MooseX/Types/TypeDecorator.pm line 157
>
MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HAS
H(0x5733a40)',
Show quoted text> 'HASH(0x5e0bb98)') called at accessor
> postal_address defined at
> C:/Perl64/site/lib/WWW/Google/Contacts/Contact.pm line 167
>
WWW::Google::Contacts::Contact::postal_address('WWW::Google::Contacts::C
ontact=HASH(0x5df86d8)',
Show quoted text> 'HASH(0x5e0bb98)') called a
> t C:/Perl64/site/lib/WWW/Google/Contacts/Base.pm line 80
>
WWW::Google::Contacts::Base::set_from_server('WWW::Google::Contacts::Con
tact=HASH(0x5df86d8)',
Show quoted text> 'HASH(0x5e0b128)') called at
> C:/Perl64/site/lib/WWW/Google/Contacts/Roles/List.pm line 87
>
WWW::Google::Contacts::Roles::List::next('WWW::Google::Contacts::Contact
List=HASH(0x29b120)')
Show quoted text> called at C:\Users\Harvey\Docu
> ments\Perl\gogltest.pl line 9~~~~~~~~~~~~
>
> Harvey Payne
> hgpayne@yahoo.com
>
>
> >________________________________
> >From: Magnus Erixzon via RT <bug-WWW-Google-Contacts@rt.cpan.org>
> >To: hgpayne@yahoo.com
> >Sent: Wednesday, June 22, 2011 3:19 AM
> >Subject: [rt.cpan.org #68774] Attribute (priority) does not pass the
> type constraint
> local
> >CPAN mirror soon, which should hopefully fix your problem.
> >
> >Please let me know if you still have issues with the module.
> >
> >cheers
> >Magnus
> >
> >
> >
> >