Changeset 1790

Show
Ignore:
Timestamp:
03/01/06 19:38:55
Author:
miyagawa
Message:

fix Bloglines bad XML. Updated test to handle 304

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WebService-Bloglines/trunk/Changes

    r1633 r1790  
    11Revision history for Perl extension WebService::Bloglines 
     2 
     30.10  2006-03-01T10:37:38Z 
     4        - Workaround for bad UTF-8 sequence in Bloglines XML. YAY! 
    25 
    360.09  Fri Aug 26 07:34:53 UTC 2005 
  • WebService-Bloglines/trunk/Makefile.PL

    r1630 r1790  
    11use ExtUtils::MakeMaker; 
     2use 5.8.1; 
    23WriteMakefile( 
    34    'NAME'      => 'WebService::Bloglines', 
  • WebService-Bloglines/trunk/lib/WebService/Bloglines.pm

    r1633 r1790  
    22 
    33use strict; 
    4 use vars qw($VERSION)
    5 $VERSION = 0.09
     4use 5.8.1
     5our $VERSION = 0.10
    66 
    77use LWP::UserAgent; 
  • WebService-Bloglines/trunk/lib/WebService/Bloglines/Entries.pm

    r1633 r1790  
    55 
    66use strict; 
     7use Encode; 
    78use XML::RSS::LibXML; 
    89use XML::LibXML; 
     
    1314    # temporary workaround till Bloglines fixes this bug 
    1415    $xml =~ s!<webMaster>(.*?)</webMaster>!encode_xml($1)!eg; 
     16 
     17    # okay, Bloglines has sometimes include \xEF in their feeds and 
     18    # that can't be decoded as UTF-8. Trying to fix it by roundtrips 
     19    $xml = Encode::decode('utf-8', $xml); 
     20    $xml = Encode::encode('utf-8', $xml); 
    1521 
    1622    my $parser = XML::LibXML->new; 
  • WebService-Bloglines/trunk/t/03_getitems.t

    r1508 r1790  
    4545# Try non-modified feed 
    4646$feed = (grep { $_->{BloglinesUnread} == 0 } @feeds)[0]; 
    47 eval { 
    48     $bloglines->getitems($feed->{BloglinesSubId}); 
    49 }; 
    50 like $@, qr/304/, $@; 
     47my $foo = $bloglines->getitems($feed->{BloglinesSubId}); 
     48is $foo, undef; 
    5149 
    5250# fetch all in single getitems