Changeset 286
- Timestamp:
- 10/01/06 13:54:52 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Net-Google-Calendar-0.3/lib/Net/Google/Calendar.pm
r285 r286 348 348 } 349 349 350 my $xml = $entry->as_xml; 351 _utf8_off($xml); 350 352 my %params = ( Content_Type => 'application/atom+xml; charset=UTF-8', 351 353 Authorization => "GoogleLogin auth=".$self->{_auth}, 352 Content => $ entry->as_xml );354 Content => $xml ); 353 355 354 356 $params{'X-HTTP-Method-Override'} = $method unless "POST" eq $method; … … 381 383 } 382 384 385 sub _utf8_off { 386 if ($] >= 5.008) { 387 require Encode; 388 return Encode::_utf8_off($_[0]); 389 } 390 } 383 391 384 392 =head1 WARNING Net-Google-Calendar-0.3/lib/Net/Google/Calendar/Entry.pm
r285 r286 54 54 my $self = shift; 55 55 56 $self->category( '',{ scheme => 'http://schemas.google.com/g/2005#kind', term => 'http://schemas.google.com/g/2005#event' } );56 $self->category( { scheme => 'http://schemas.google.com/g/2005#kind', term => 'http://schemas.google.com/g/2005#event' } ); 57 57 58 58 $self->{_gd_ns} = XML::Atom::Namespace->new(gd => 'http://schemas.google.com/g/2005'); … … 174 174 my($ns, $name, $attr) = @_; 175 175 my $ns_uri = ref($ns) eq 'XML::Atom::Namespace' ? $ns->{uri} : $ns; 176 my $node = first($atom-> {doc}, $ns_uri, $name);176 my $node = first($atom->elem, $ns_uri, $name); 177 177 return $node unless defined $node && defined $attr; 178 178 my $val;
