Changeset 1065

Show
Ignore:
Timestamp:
07/10/06 14:17:54
Author:
miyagawa
Message:

Override XML::LibXML with Liberal only in parsing. Fixes #324 and #328

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Aggregator/Simple.pm

    r1011 r1065  
    1313 
    1414$XML::Feed::RSS::PREFERRED_PARSER = first { $_->require } qw( XML::RSS::Liberal XML::RSS::LibXML XML::RSS ); 
    15  
    16 eval { require XML::Liberal }; 
    17 if (!$@ && $XML::Liberal::VERSION >= 0.10) { 
    18     XML::Liberal->globally_override('LibXML'); 
    19 } 
    2015 
    2116sub register { 
     
    9085    my $args = { content => $$xml_ref }; 
    9186    $context->run_hook('aggregator.filter.feed', $args); 
     87 
     88    # override XML::LibXML with Liberal 
     89    my $sweeper; # XML::Liberal >= 0.13 
     90 
     91    eval { require XML::Liberal }; 
     92    if (!$@ && $XML::Liberal::VERSION >= 0.10) { 
     93        $sweeper = XML::Liberal->globally_override('LibXML'); 
     94    } 
    9295 
    9396    my $remote = eval { XML::Feed->parse(\$args->{content}) };