/[webpac2]/trunk/lib/WebPAC/Validate.pm
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/lib/WebPAC/Validate.pm

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

revision 850 by dpavlin, Sun May 27 10:50:37 2007 UTC revision 851 by dpavlin, Sun May 27 11:14:40 2007 UTC
# Line 468  Generate report of delimiter tamplates Line 468  Generate report of delimiter tamplates
468    
469    my $report = $validate->delimiter_teplates(    my $report = $validate->delimiter_teplates(
470          report => 1,          report => 1,
471          accumulated => 1,          current_input => 1,
472    );    );
473    
474  Options:  Options:
# Line 479  Options: Line 479  Options:
479    
480  Generate humanly readable report with single fields  Generate humanly readable report with single fields
481    
482  =item accumulated  =item current_input
483    
484  Use accumulated data from all inputs  Report just current_input and not accumulated data
485    
486  =back  =back
487    
# Line 492  sub delimiters_templates { Line 492  sub delimiters_templates {
492    
493          my $args = {@_};          my $args = {@_};
494    
495          my $t;          my $t = $self->{_accumulated_delimiters_templates};
496          if ( $args->{accumulated} ) {          $t = $self->{_delimiters_templates} if ( $args->{current_input} );
                 $t = $self->{_accumulated_delimiters_templates};  
         } else {  
                 $t = $self->{_delimiters_templates};  
         }  
497    
498          my $log = $self->_get_logger;          my $log = $self->_get_logger;
499    
# Line 552  sub save_delimiters_templates { Line 548  sub save_delimiters_templates {
548          $path .= '.new' if ( -e $path );          $path .= '.new' if ( -e $path );
549    
550          open(my $d, '>', $path) || $log->fatal("can't open $path: $!");          open(my $d, '>', $path) || $log->fatal("can't open $path: $!");
551          print $d $self->delimiters_templates( accumulated => 1 );          print $d $self->delimiters_templates;
552          close($d);          close($d);
553    
554          $log->info("new delimiters templates saved to $path");          $log->info("new delimiters templates saved to $path");

Legend:
Removed from v.850  
changed lines
  Added in v.851

  ViewVC Help
Powered by ViewVC 1.1.26