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: |
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 |
|
|
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 |
|
|
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"); |