Changeset 1719

Show
Ignore:
Timestamp:
10/06/06 00:32:24
Author:
miyagawa
Message:

CustomFeed?::Script: require YAML::Syck for interop. Fixes #416

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/deps/CustomFeed-Script.yaml

    r1717 r1719  
    22author: Tatsuhiko Miyagawa 
    33depends: 
     4  YAML::Syck: 0 
    45bundles: 
    56  - Aggregator::Simple 
  • trunk/plagger/lib/Plagger/Plugin/CustomFeed/Script.pm

    r1718 r1719  
    55use URI; 
    66use URI::Escape; 
    7 use YAML
     7use YAML::Syck
    88 
    99use Plagger::Plugin::Aggregator::Simple; 
     
    4949    } else { 
    5050        eval { 
    51             my $feed = YAML::Load($output); 
     51            my $feed = YAML::Syck::Load($output); 
    5252            $context->log(debug => "Looks like output is YAML"); 
    5353            local $self->{conf} = $feed; 
  • trunk/plagger/t/plugins/CustomFeed-Script/base.t

    r1717 r1719  
    5050is $context->update->feeds->[0]->link, "http://example.com/"; 
    5151is $context->update->feeds->[0]->description, "baz"; 
     52 
     53=== 
     54--- input config 
     55plugins: 
     56  - module: Subscription::Config 
     57    config: 
     58      feed: 
     59        - script://$t::TestPlagger::BaseDirURI/t/samples/scraper-yaml-syck.pl 
     60  - module: CustomFeed::Script 
     61--- expected 
     62is $context->update->feeds->[0]->title, "Foo Bar"; 
     63is $context->update->feeds->[0]->link, "http://example.com/"; 
     64is $context->update->feeds->[0]->count, 2; 
     65is $context->update->feeds->[0]->entries->[0]->title, "Entry 1"; 
     66is $context->update->feeds->[0]->entries->[0]->link, "http://example.com/1";