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