+ my @output_modules;
+
+ foreach my $output ( @outputs ) {
+
+#warn '## output = ',dump( $output );
+
+ my $module = $output->{module} || $log->logdie("need module in output section of $database");
+ $module = 'WebPAC::Output::' . $module unless $module =~ m/::/;
+
+ $log->debug("loading output module $module");
+ eval "require $module";
+
+ # add database to arugemnts for output filter
+ $output->{database} = $database;
+ $output->{clean} = $clean;
+
+ $log->debug("calling $module->new(",dump( $output ),")");
+ my $out = new $module->new( $output );
+ if ( $out->init ) {
+ push @output_modules, $out;
+ } else {
+ $log->warn("SKIPPED $module");
+ }
+ }