projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sort out the cluster table further
[spider.git]
/
perl
/
Filter.pm
diff --git
a/perl/Filter.pm
b/perl/Filter.pm
index 8acce7f383bdca5b235433509f94e1e4e98fcc7f..b927dc1f0700c0917e9bccbc61f0f345123c2c54 100644
(file)
--- a/
perl/Filter.pm
+++ b/
perl/Filter.pm
@@
-184,8
+184,6
@@
sub it
{
my $self = shift;
{
my $self = shift;
- my $hops = undef;
-
my $filter;
my @keys = sort $self->getfilkeys;
my $key;
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);
}
return ($r, $hops);
}
@@
-369,7
+359,7
@@
sub parse
}
$filter = Filter::read_in($sort, $call, $flag);
}
$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;
$ntoken++;
next;
@@
-466,6
+456,13
@@
sub parse
push @t, "(\$r->[$fref->[2]]>=$1 && \$r->[$fref->[2]]<=$2)";
}
$s .= "(" . join(' || ', @t) . ")";
push @t, "(\$r->[$fref->[2]]>=$1 && \$r->[$fref->[2]]<=$2)";
}
$s .= "(" . join(' || ', @t) . ")";
+ } elsif ($fref->[1] eq 't') {
+ my @t;
+ for (@val) {
+ s/\*//g;
+ push @t, "\$r->[$fref->[2]]=~/$_/i";
+ }
+ $s .= "(" . join(' || ', @t) . ")";
} else {
confess("invalid letter $fref->[1]");
}
} else {
confess("invalid letter $fref->[1]");
}