add _haslist and has_*
[spider.git] / perl / Route.pm
index 92290d21417d5a3e0a9b56f5ff1c43c1924bfb0d..582434415073033e2ba22aed70c625b2e2c8e3b1 100644 (file)
@@ -130,6 +130,16 @@ sub _dellist
        return @out;
 }
 
+sub _haslist
+{
+       my $self = shift;
+       my $field = shift;
+       my @out;
+       my $call = shift;
+       my $r = grep $_->{call} eq $call, @{$self->{$field}};
+       dbg(ref($self) . " $call is " . $r?'in':'NOT in' . " $self->{call}\->\{$field\}") if isdbg('routelow');
+}
+
 sub is_empty
 {
        my $self = shift;