Hello community,
here is the log from the commit of package perl-Text-CSV for openSUSE:Factory checked in at 2017-05-06 20:45:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Text-CSV (Old)
and /work/SRC/openSUSE:Factory/.perl-Text-CSV.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Text-CSV"
Sat May 6 20:45:30 2017 rev:20 rq:492406 version:1.95
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Text-CSV/perl-Text-CSV.changes 2017-04-20 20:47:36.876261201 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Text-CSV.new/perl-Text-CSV.changes 2017-05-06 20:45:31.837574249 +0200
@@ -1,0 +2,9 @@
+Thu Apr 27 06:53:44 UTC 2017 - coolo@suse.com
+
+- updated to 1.95
+ see /usr/share/doc/packages/perl-Text-CSV/Changes
+
+ 1.95 2017-04-27
+ - import "strict" attribute introduced in Text::CSV_XS 1.29
+
+-------------------------------------------------------------------
Old:
----
Text-CSV-1.94.tar.gz
New:
----
Text-CSV-1.95.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-CSV.spec ++++++
--- /var/tmp/diff_new_pack.sAs9rv/_old 2017-05-06 20:45:32.873428122 +0200
+++ /var/tmp/diff_new_pack.sAs9rv/_new 2017-05-06 20:45:32.881426994 +0200
@@ -17,7 +17,7 @@
Name: perl-Text-CSV
-Version: 1.94
+Version: 1.95
Release: 0
%define cpan_name Text-CSV
Summary: Comma-Separated Values Manipulator (Using Xs or Pureperl)
++++++ Text-CSV-1.94.tar.gz -> Text-CSV-1.95.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.94/Changes new/Text-CSV-1.95/Changes
--- old/Text-CSV-1.94/Changes 2017-04-11 07:32:30.000000000 +0200
+++ new/Text-CSV-1.95/Changes 2017-04-26 19:38:44.000000000 +0200
@@ -1,5 +1,8 @@
Revision history for Perl extension Text::CSV.
+1.95 2017-04-27
+ - import "strict" attribute introduced in Text::CSV_XS 1.29
+
1.94 2017-04-11
- Fix 5.6.2 issues
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.94/META.json new/Text-CSV-1.95/META.json
--- old/Text-CSV-1.94/META.json 2017-04-11 07:35:25.000000000 +0200
+++ new/Text-CSV-1.95/META.json 2017-04-26 19:40:08.000000000 +0200
@@ -47,5 +47,5 @@
"url" : "http://github.com/makamaka/Text-CSV"
}
},
- "version" : "1.94"
+ "version" : "1.95"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.94/META.yml new/Text-CSV-1.95/META.yml
--- old/Text-CSV-1.94/META.yml 2017-04-11 07:35:25.000000000 +0200
+++ new/Text-CSV-1.95/META.yml 2017-04-26 19:40:08.000000000 +0200
@@ -25,4 +25,4 @@
Test::More: '0.71'
resources:
repository: http://github.com/makamaka/Text-CSV
-version: '1.94'
+version: '1.95'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.94/lib/Text/CSV.pm new/Text-CSV-1.95/lib/Text/CSV.pm
--- old/Text-CSV-1.94/lib/Text/CSV.pm 2017-04-11 07:32:36.000000000 +0200
+++ new/Text-CSV-1.95/lib/Text/CSV.pm 2017-04-26 19:37:50.000000000 +0200
@@ -9,7 +9,7 @@
@EXPORT_OK = qw( csv );
BEGIN {
- $VERSION = '1.94';
+ $VERSION = '1.95';
$DEBUG = 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Text-CSV-1.94/lib/Text/CSV_PP.pm new/Text-CSV-1.95/lib/Text/CSV_PP.pm
--- old/Text-CSV-1.94/lib/Text/CSV_PP.pm 2017-04-11 07:32:36.000000000 +0200
+++ new/Text-CSV-1.95/lib/Text/CSV_PP.pm 2017-04-26 19:37:50.000000000 +0200
@@ -12,7 +12,7 @@
use vars qw($VERSION @ISA @EXPORT_OK);
use Carp;
-$VERSION = '1.94';
+$VERSION = '1.95';
@ISA = qw(Exporter);
@EXPORT_OK = qw(csv);
@@ -57,6 +57,7 @@
2011 => "ECR - Characters after end of quoted field",
2012 => "EOF - End of data in parsing input stream",
2013 => "ESP - Specification error for fragments RFC7111",
+ 2014 => "ENF - Inconsistent number of fields",
# EIQ - Error Inside Quotes
2021 => "EIQ - NL char inside quotes, binary off",
@@ -181,6 +182,7 @@
decode_utf8 => 1,
auto_diag => 0,
diag_verbose => 0,
+ strict => 0,
blank_is_undef => 0,
empty_is_undef => 0,
allow_whitespace => 0,
@@ -376,6 +378,7 @@
decode_utf8 => 35,
_has_hooks => 36,
_is_bound => 26, # 26 .. 29
+ strict => 58,
);
my %_hidden_cache_id = qw(
@@ -546,6 +549,12 @@
$self->{binary};
}
+sub strict {
+ my $self = shift;
+ @_ and $self->_set_attr_X ("strict", shift);
+ $self->{strict};
+ }
+
sub decode_utf8 {
my $self = shift;
@_ and $self->_set_attr_X ("decode_utf8", shift);
@@ -1463,7 +1472,7 @@
}
for (qw/
- binary decode_utf8 always_quote quote_empty
+ binary decode_utf8 always_quote strict quote_empty
allow_loose_quotes allow_loose_escapes
allow_unquoted_escape allow_whitespace blank_is_undef
empty_is_undef verbatim auto_diag diag_verbose
@@ -1567,7 +1576,7 @@
for (qw/
binary decode_utf8 allow_loose_escapes allow_loose_quotes
allow_whitespace always_quote quote_empty quote_space
- escape_null quote_binary auto_diag diag_verbose
+ escape_null quote_binary auto_diag diag_verbose strict
has_error_input blank_is_undef empty_is_undef has_ahead
keep_meta_info verbatim has_hooks eol_is_cr eol_len
/) {
@@ -1782,6 +1791,15 @@
my $result = $self->____parse($ctx, $src, $fields, $fflags);
$self->{_RECNO} = ++($ctx->{recno});
$self->{_EOF} = '';
+
+ if ($ctx->{strict}) {
+ $ctx->{strict_n} ||= $ctx->{fld_idx};
+ if ($ctx->{strict_n} != $ctx->{fld_idx}) {
+ $self->__parse_error($ctx, 2014, $ctx->{used});
+ return;
+ }
+ }
+
if ($ctx->{useIO}) {
if (defined $ctx->{tmp} and $ctx->{used} < $ctx->{size} and $ctx->{has_ahead}) {
$self->{_AHEAD} = substr($ctx->{tmp}, $ctx->{used}, $ctx->{size} - $ctx->{used});
@@ -2888,6 +2906,15 @@
simple string like C<"\x{00a0}"> might still be binary, but not marked UTF8,
so setting C<< { binary => 1 } >> is still a wise option.
+=head3 strict
+
+ my $csv = Text::CSV_PP->new ({ strict => 1 });
+ $csv->strict (0);
+ my $f = $csv->strict;
+
+If this attribute is set to C<1>, any row that parses to a different number
+of fields than the previous row will cause the parser to throw error 2014.
+
=head3 decode_utf8
my $csv = Text::CSV_PP->new ({ decode_utf8 => 1 });
@@ -3709,7 +3736,8 @@
Note that in parsing with C