get all the debugging finally into the debug files when things go wrong
[spider.git] / perl / Filter.pm
index 2981a7b75e6d9f06523f314f1e2c70ce5542215d..a53ae034b6cfc4fd88426a483e171a12aedfb6f7 100644 (file)
@@ -48,7 +48,6 @@ package Filter;
 use DXVars;
 use DXUtil;
 use DXDebug;
-use Carp;
 
 use strict;
 
@@ -106,9 +105,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 $@;