Revision 5c4833d7
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/Helper/Csv.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use warnings; |
5 | 5 |
|
6 |
use version 0.77; |
|
6 | 7 |
use Carp; |
7 | 8 |
use IO::File; |
8 | 9 |
use Params::Validate qw(:all); |
... | ... | |
156 | 157 |
push @data, \%hr; |
157 | 158 |
} else { |
158 | 159 |
last if $self->_csv->eof; |
159 |
push @errors, [ |
|
160 |
$self->_csv->error_input, |
|
161 |
$self->_csv->error_diag, |
|
162 |
$self->_io->input_line_number, |
|
163 |
]; |
|
160 |
# Text::CSV_XS 0.89 added record number to error_diag |
|
161 |
if (qv(Text::CSV_XS->VERSION) >= qv('0.89')) { |
|
162 |
push @errors, [ |
|
163 |
$self->_csv->error_input, |
|
164 |
$self->_csv->error_diag, |
|
165 |
]; |
|
166 |
} else { |
|
167 |
push @errors, [ |
|
168 |
$self->_csv->error_input, |
|
169 |
$self->_csv->error_diag, |
|
170 |
$self->_io->input_line_number, |
|
171 |
]; |
|
172 |
} |
|
164 | 173 |
} |
165 | 174 |
last if $self->_csv->eof; |
166 | 175 |
} |
Auch abrufbar als: Unified diff
Kompatibilität mit Text::CSV_XS >= 0.89