/[webpac2]/trunk/run.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/run.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 921 by dpavlin, Tue Oct 30 23:32:58 2007 UTC revision 924 by dpavlin, Wed Oct 31 00:26:45 2007 UTC
# Line 299  foreach my $database ( sort keys %{ $con Line 299  foreach my $database ( sort keys %{ $con
299                  debug => $debug,                  debug => $debug,
300          });          });
301    
         sub iterate_over {  
                 my ( $what, $error ) = @_;  
                 my @result;  
                 if ( ref( $what ) eq 'ARRAY' ) {  
                         @result = @{ $what };  
                 } elsif ($db_config->{input}) {  
                         @result =  ( $what );  
                 } else {  
                         $error->() if ref($error) eq 'CODE';  
                 }  
                 return @result;  
         }  
302    
303          #          #
304          # prepare output          # prepare output
305          #          #
306          my @outputs = iterate_over( $db_config->{output}, sub {          my @outputs = force_array( $db_config->{output}, sub {
307                  $log->error("Database $database doesn't have any outputs defined. Do you want to remove it from configuration?" );                  $log->error("Database $database doesn't have any outputs defined. Do you want to remove it from configuration?" );
308          } );          } );
309    
# Line 346  warn '## output = ',dump( $output ); Line 334  warn '## output = ',dump( $output );
334          #          #
335    
336    
337          my @inputs = iterate_over( $db_config->{input}, sub {          my @inputs = force_array( $db_config->{input}, sub {
338                  $log->info("database $database doesn't have inputs defined");                  $log->info("database $database doesn't have inputs defined");
339          } );          } );
340    

Legend:
Removed from v.921  
changed lines
  Added in v.924

  ViewVC Help
Powered by ViewVC 1.1.26