Changeset 857

Show
Ignore:
Timestamp:
05/30/06 15:24:16
Author:
miyagawa
Message:

Subscription::File: allow empty lines

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Subscription/File.pm

    r851 r857  
    55 
    66use base qw(Plagger::Plugin); 
    7 use Plagger::Util qw(load_uri)
     7use Plagger::Util
    88 
    99use URI; 
     
    2323    $uri->scheme('file') unless $uri->scheme; 
    2424 
    25     for my $line ( grep { !/^\s*#/ } split /\n/, load_uri $uri) { 
     25    for ( split /\n/, Plagger::Util::load_uri($uri)) { 
     26        s/\#.*//; 
     27        next if /^\s*$/; 
    2628        my $feed = Plagger::Feed->new; 
    27  
    28         $feed->url($line); 
    29  
     29        $feed->url($_); 
    3030        $context->subscription->add($feed); 
    3131    } 
  • trunk/plagger/t/plugins/Subscription-File/feeds.txt

    r851 r857  
    44http://www.gnome.org/~jdub/blog/?flav=rss 
    55# this is a comment 
     6 
    67http://blog.clearairturbulence.org/?flav=rss 
    78http://www.hadess.net/diary.rss