Changeset 751

Show
Ignore:
Timestamp:
05/15/06 22:40:06
Author:
miyagawa
Message:
  • Filter::TruePermalink?: Don't update links if s/// fail
  • Added ime.nu|st truepermalink filter
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/TruePermalink.pm

    r728 r751  
    6464        if ($plugin->{rewrite}) { 
    6565            local $_ = $link; 
    66             $count += eval $plugin->{rewrite}; 
     66            my $done = eval $plugin->{rewrite}; 
    6767            if ($@) { 
    6868                $context->error("$@ in $plugin->{rewrite}"); 
     69            } elsif ($done) { 
     70                $count += $done; 
     71                $rewritten = $_; 
     72                $callback->($_); 
    6973            } 
    70             $callback->($_); 
    71             $rewritten = $_; 
    7274        } elsif ($plugin->{query_param}) { 
    7375            my $param = URI->new($link)->query_param($plugin->{query_param})