Lines 304-310
sub validate {
Link Here
|
304 |
my ($self) = @_; |
304 |
my ($self) = @_; |
305 |
|
305 |
|
306 |
open my $fh, "<", \$self->file_content or die; |
306 |
open my $fh, "<", \$self->file_content or die; |
307 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1 } ); |
307 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1, formula => 'empty' } ); |
308 |
|
308 |
|
309 |
$csv->column_names(qw( header_key header_value )); |
309 |
$csv->column_names(qw( header_key header_value )); |
310 |
my @header_rows = $csv->getline_hr_all( $fh, 0, 12 ); |
310 |
my @header_rows = $csv->getline_hr_all( $fh, 0, 12 ); |
Lines 331-337
sub _set_report_type_from_file {
Link Here
|
331 |
my ($self) = @_; |
331 |
my ($self) = @_; |
332 |
|
332 |
|
333 |
open my $fh, "<", \$self->file_content or die; |
333 |
open my $fh, "<", \$self->file_content or die; |
334 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1 } ); |
334 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1, formula => 'empty' } ); |
335 |
|
335 |
|
336 |
$csv->column_names(qw( header_key header_value )); |
336 |
$csv->column_names(qw( header_key header_value )); |
337 |
my @header_rows = $csv->getline_hr_all( $fh, 0, 12 ); |
337 |
my @header_rows = $csv->getline_hr_all( $fh, 0, 12 ); |
Lines 354-360
sub _get_rows_from_COUNTER_file {
Link Here
|
354 |
my ($self) = @_; |
354 |
my ($self) = @_; |
355 |
|
355 |
|
356 |
open my $fh, "<", \$self->file_content or die; |
356 |
open my $fh, "<", \$self->file_content or die; |
357 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1 } ); |
357 |
my $csv = Text::CSV_XS->new( { binary => 1, always_quote => 1, eol => $/, decode_utf8 => 1, formula => 'empty' } ); |
358 |
|
358 |
|
359 |
my $header_columns = $csv->getline_all( $fh, 13, 1 ); |
359 |
my $header_columns = $csv->getline_all( $fh, 13, 1 ); |
360 |
$csv->column_names( @{$header_columns}[0] ); |
360 |
$csv->column_names( @{$header_columns}[0] ); |