Changeset 286

Show
Ignore:
Timestamp:
10/01/06 13:54:52 (2 years ago)
Author:
miya
Message:

some fixes to work correctly.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Net-Google-Calendar-0.3/lib/Net/Google/Calendar.pm

    r285 r286  
    348348    } 
    349349 
     350    my $xml = $entry->as_xml; 
     351    _utf8_off($xml); 
    350352    my %params = ( Content_Type => 'application/atom+xml; charset=UTF-8', 
    351353                   Authorization => "GoogleLogin auth=".$self->{_auth}, 
    352                    Content => $entry->as_xml ); 
     354                   Content => $xml ); 
    353355 
    354356    $params{'X-HTTP-Method-Override'} = $method unless "POST" eq $method; 
     
    381383} 
    382384 
     385sub _utf8_off { 
     386    if ($] >= 5.008) { 
     387        require Encode; 
     388        return Encode::_utf8_off($_[0]); 
     389    } 
     390} 
    383391 
    384392=head1 WARNING 
  • Net-Google-Calendar-0.3/lib/Net/Google/Calendar/Entry.pm

    r285 r286  
    5454    my $self = shift;                                                                                
    5555                                                                                                   
    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' } ); 
    5757                                                                                                   
    5858    $self->{_gd_ns} = XML::Atom::Namespace->new(gd => 'http://schemas.google.com/g/2005');           
     
    174174   my($ns, $name, $attr) = @_; 
    175175   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); 
    177177   return $node unless defined $node && defined $attr; 
    178178   my $val;