put in input filter for ann and output filters for ann/wwv/spots
[spider.git] / perl / Filter.pm
index 2981a7b75e6d9f06523f314f1e2c70ce5542215d..aefa922419ee94afac488101b11c184aba45a8eb 100644 (file)
@@ -106,9 +106,20 @@ sub it
 #
 sub read_in
 {
-       my ($sort, $call) = @_;
-       my $fn = "$filterbasefn/$sort/$call.pl";
+       my ($sort, $call, $flag) = @_;
+
+    # first uppercase
+       $flag = ($flag) ? "in_" : "";
+       $call = uc $call;
+       my $fn = "$filterbasefn/$sort/$flag$call.pl";
+
+       # otherwise lowercase
+       unless (-e $fn) {
+               $call = lc $call;
+               $fn = "$filterbasefn/$sort/$flag$call.pl";
+       }
        
+       # load it
        if (-e $fn) {
                do "$fn";
                dbg('conn', "$@") if $@;