--- trunk/spider/filter.pm 2004/03/17 12:19:14 65 +++ trunk/spider/filter.pm 2004/03/18 23:07:21 69 @@ -89,12 +89,16 @@ if ($contents =~ s,(.*),$new_title,is) { print STDERR "replace title '$1' with '$new_title'\n" if ($verbose); - } elsif ( - # try to insert after , or at top - $contents =~ s,(),$1$new_title,is || - $contents =~ s,(),$1$new_title,is || - $contents =~ s,^,$new_title, ) { + } elsif ($contents =~ s,(),$1$new_title,is) { + print STDERR "adding title '$new_title' after \n" if ($verbose); + + } elsif ($contents =~ s,(),$1$new_title,is) { + print STDERR "adding title '$new_title' after \n" if ($verbose); + + } elsif ($contents =~ s,^,$new_title,) { print STDERR "adding new title '$new_title'\n" if ($verbose); + } else { + print STDERR "WARNING: filter couldn't add new title '$new_title' anywhere!"; } return $contents;