projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8814f4c
)
Kompatibilität mit Text::CSV_XS >= 0.89
author
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 30 May 2013 10:23:16 +0000
(12:23 +0200)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 30 May 2013 10:23:16 +0000
(12:23 +0200)
SL/Helper/Csv.pm
patch
|
blob
|
history
diff --git
a/SL/Helper/Csv.pm
b/SL/Helper/Csv.pm
index
e481614
..
2d454be
100644
(file)
--- a/
SL/Helper/Csv.pm
+++ b/
SL/Helper/Csv.pm
@@
-3,6
+3,7
@@
package SL::Helper::Csv;
use strict;
use warnings;
use strict;
use warnings;
+use version 0.77;
use Carp;
use IO::File;
use Params::Validate qw(:all);
use Carp;
use IO::File;
use Params::Validate qw(:all);
@@
-156,11
+157,19
@@
sub _parse_data {
push @data, \%hr;
} else {
last if $self->_csv->eof;
push @data, \%hr;
} else {
last if $self->_csv->eof;
- push @errors, [
- $self->_csv->error_input,
- $self->_csv->error_diag,
- $self->_io->input_line_number,
- ];
+ # Text::CSV_XS 0.89 added record number to error_diag
+ if (qv(Text::CSV_XS->VERSION) >= qv('0.89')) {
+ push @errors, [
+ $self->_csv->error_input,
+ $self->_csv->error_diag,
+ ];
+ } else {
+ push @errors, [
+ $self->_csv->error_input,
+ $self->_csv->error_diag,
+ $self->_io->input_line_number,
+ ];
+ }
}
last if $self->_csv->eof;
}
}
last if $self->_csv->eof;
}