X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FFilter.pm;h=59ace8af8edb2986827d2258760644eac290ee02;hb=97fa4618141c1e20858660a6732d94ea3f431dd9;hp=8acce7f383bdca5b235433509f94e1e4e98fcc7f;hpb=b85ee0ca2b03ee2c5be20bd430cfa00757b7ebdb;p=spider.git diff --git a/perl/Filter.pm b/perl/Filter.pm index 8acce7f3..59ace8af 100644 --- a/perl/Filter.pm +++ b/perl/Filter.pm @@ -184,8 +184,6 @@ sub it { my $self = shift; - my $hops = undef; - my $filter; my @keys = sort $self->getfilkeys; my $key; @@ -210,17 +208,9 @@ sub it } } - # hops are done differently - if ($self->{hops}) { - my ($comp, $ref); - while (($comp, $ref) = each %{$self->{hops}}) { - my ($field, $h) = @$ref; - if ($_[$field] =~ m{$comp}) { - $hops = $h; - last; - } - } - } + # hops are done differently (simply) + my $hops = $self->{hops} if exists $self->{hops}; + return ($r, $hops); } @@ -369,7 +359,7 @@ sub parse } $filter = Filter::read_in($sort, $call, $flag); - $filter = Filter->new($sort, $call, $flag) unless $filter; + $filter = Filter->new($sort, $call, $flag) if !$filter || $filter->isa('Filter::Old'); $ntoken++; next;