r1413@llin: dpavlin | 2007-10-31 13:13:58 +0100
[webpac2] / run.pl
diff --git a/run.pl b/run.pl
index 07f8eeb..c974a5c 100755 (executable)
--- a/run.pl
+++ b/run.pl
@@ -318,7 +318,8 @@ warn '## output = ',dump( $output );
        
                $log->debug("loading output module $module");
                eval "require $module";
-       
+
+               # add database to arugemnts for output filter
                $output->{database} = $database;
 
                $log->debug("calling $module->new(",dump( $output ),")");
@@ -508,6 +509,16 @@ warn '## output = ',dump( $output );
                }
 
 
+               # setup input name for all output filters
+               foreach my $out ( @output_modules ) {
+                       if ( $out->can('input') ) {
+                               $out->input( $input_name );
+                       } else {
+                               $log->warn("output filter $out doesn't support input name");
+                       }
+               }
+
+
                foreach my $pos ( 0 ... $input_db->size ) {
 
                        my $row = $input_db->fetch || next;