Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Text-CSV_XS for
openSUSE:Factory checked in at 2026-06-30 15:11:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Text-CSV_XS (Old)
and /work/SRC/openSUSE:Factory/.perl-Text-CSV_XS.new.11887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Text-CSV_XS"
Tue Jun 30 15:11:25 2026 rev:61 rq:1362464 version:1.640.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Text-CSV_XS/perl-Text-CSV_XS.changes
2026-05-13 20:59:06.856587069 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Text-CSV_XS.new.11887/perl-Text-CSV_XS.changes
2026-06-30 15:11:51.536843644 +0200
@@ -1,0 +2,17 @@
+Tue Jun 23 08:40:35 UTC 2026 - Tina Müller <[email protected]>
+
+- updated to 1.640.0 (1.64)
+ see /usr/share/doc/packages/perl-Text-CSV_XS/ChangeLog
+
+ 1.64 - 2026-06-22, H.Merijn Brand
+ * Fix syntax error in csv2xlsx
+
+ 1.63 - 2026-06-22, H.Merijn Brand
+ * Check attribute lengths (memory protection)
+ * Minor code consistencies (not user-visible)
+ * Dropped support for 5.6.x and 5.8.0. Minimum perl is now 5.8.1
+ * Fix special str setting consistency for types, undef_str and
+ comment_str
+ * Characters []:*/\ are not allowed in XLSX sheet names
+
+-------------------------------------------------------------------
Old:
----
Text-CSV_XS-1.62.tgz
New:
----
Text-CSV_XS-1.64.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-CSV_XS.spec ++++++
--- /var/tmp/diff_new_pack.gKywUZ/_old 2026-06-30 15:11:52.256868032 +0200
+++ /var/tmp/diff_new_pack.gKywUZ/_new 2026-06-30 15:11:52.260868167 +0200
@@ -18,10 +18,10 @@
%define cpan_name Text-CSV_XS
Name: perl-Text-CSV_XS
-Version: 1.620.0
+Version: 1.640.0
Release: 0
-# 1.62 -> normalize -> 1.620.0
-%define cpan_version 1.62
+# 1.64 -> normalize -> 1.640.0
+%define cpan_version 1.64
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Comma-Separated Values manipulation routines
URL: https://metacpan.org/release/%{cpan_name}
@@ -32,7 +32,7 @@
BuildRequires: perl-macros
Provides: perl(Text::CSV_XS) = %{version}
%undefine __perllib_provides
-Recommends: perl(Encode) >= 3.22
+Recommends: perl(Encode) >= 3.24
%{perl_requires}
%description
++++++ Text-CSV_XS-1.62.tgz -> Text-CSV_XS-1.64.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/CSV_XS.pm
new/Text-CSV_XS-1.64/CSV_XS.pm
--- old/Text-CSV_XS-1.62/CSV_XS.pm 2026-04-26 16:24:14.000000000 +0200
+++ new/Text-CSV_XS-1.64/CSV_XS.pm 2026-06-22 12:57:04.000000000 +0200
@@ -13,7 +13,7 @@
# 0.10 - 0.23 Jochen Wiedmann <[email protected]>
# Based on (the original) Text::CSV by Alan Citterman <[email protected]>
-require 5.006001;
+require 5.008001;
use strict;
use warnings;
@@ -23,7 +23,7 @@
use Carp;
use vars qw( $VERSION @ISA @EXPORT_OK %EXPORT_TAGS );
-$VERSION = "1.62";
+$VERSION = "1.64";
@ISA = qw( Exporter );
XSLoader::load ("Text::CSV_XS", $VERSION);
@@ -1002,7 +1002,7 @@
$ahead = $3;
}
- my $hr = \$hdr; # Will cause croak on perl-5.6.x
+ my $hr = \$hdr;
open my $h, "<", $hr or croak ($self->SetDiag (1010));
my $row = $self->getline ($h) or croak ();
@@ -3004,8 +3004,6 @@
=head2 header
-This method does NOT work in perl-5.6.x
-
Parse the CSV header and set L<C<sep>|/sep>, column_names and encoding.
my @hdr = $csv->header ($fh);
@@ -3747,9 +3745,8 @@
X<encoding>
If passed, it should be an encoding accepted by the C<:encoding()> option
-to C<open>. There is no default value. This attribute does not work in perl
-5.6.x. C<encoding> can be abbreviated to C<enc> for ease of use in command
-line invocations.
+to C<open>. There is no default value. C<encoding> can be abbreviated to
+C<enc> for ease of use in command line invocations.
If C<encoding> is set to the literal value C<"auto">, the method L</header>
will be invoked on the opened stream to check if there is a BOM and set the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/CSV_XS.xs
new/Text-CSV_XS-1.64/CSV_XS.xs
--- old/Text-CSV_XS-1.62/CSV_XS.xs 2026-04-28 14:57:08.000000000 +0200
+++ new/Text-CSV_XS-1.64/CSV_XS.xs 2026-05-03 21:08:08.000000000 +0200
@@ -21,10 +21,10 @@
#include "ppport.h"
#define is_utf8_sv(s) is_utf8_string ((U8 *)SvPV_nolen (s), SvCUR (s))
-#define MAINT_DEBUG 0
-#define MAINT_DEBUG_EOL 0
+#define MAINT_DEBUG 0
+#define MAINT_DEBUG_EOL 0
-#define BUFFER_SIZE 1024
+#define BUFFER_SIZE 1024
#define CSV_XS_TYPE_WARN 1
#define CSV_XS_TYPE_PV 0
@@ -32,7 +32,7 @@
#define CSV_XS_TYPE_NV 2
/* maximum length for EOL, SEP, and QUOTE - keep in sync with .pm */
-#define MAX_ATTR_LEN 16
+#define MAX_ATTR_LEN 16
#define CSV_FLAGS_QUO 0x0001
#define CSV_FLAGS_BIN 0x0002
@@ -489,6 +489,22 @@
return NULL;
} /* cx_xs_cache_get_eolt */
+/* Hold an SV alive across cache memcpy ()s so the raw PV pointer we
+ * stash in csv->{undef_str,comment_str,types} stays valid even if
+ * the user mutates the public hash entry. The "_*_HELD" private
+ * hash key carries the refcount; the SV is freed automatically when
+ * csv->self is destroyed (or the key is overwritten/deleted). */
+#define hold_sv(hv,key,val) cx_hold_sv (aTHX_ hv, key, sizeof (key) - 1,
val)
+static void cx_hold_sv (pTHX_ HV *hv, const char *key, I32 klen, SV *val) {
+ if (val == NULL) {
+ (void)hv_delete (hv, key, klen, G_DISCARD);
+ return;
+ }
+ SvREFCNT_inc (val);
+ unless (hv_store (hv, key, klen, val, 0))
+ SvREFCNT_dec (val);
+ } /* cx_hold_sv */
+
#define xs_cache_set(hv,idx,val) cx_xs_cache_set (aTHX_ hv, idx, val)
static void cx_xs_cache_set (pTHX_ HV *hv, int idx, SV *val) {
SV **svp;
@@ -565,16 +581,19 @@
/* string */
case CACHE_ID_sep:
+ if (len > MAX_ATTR_LEN) croak ("INI - SEP too long"); /* 1006 */
(void)memcpy (csv->sep, cp, len);
csv->sep_len = len == 1 ? 0 : len;
break;
case CACHE_ID_quo:
+ if (len > MAX_ATTR_LEN) croak ("INI - QUOTE too long"); /* 1007 */
(void)memcpy (csv->quo, cp, len);
csv->quo_len = len == 1 ? 0 : len;
break;
case CACHE_ID_eol:
+ if (len > MAX_ATTR_LEN) croak ("INI - EOL too long"); /* 1005 */
(void)memcpy (csv->eol, cp, len);
csv->eol_len = len;
csv->eol_type = len == 0 ? EOL_TYPE_UNDEF
@@ -593,26 +612,37 @@
case CACHE_ID_undef_str:
if (*cp) {
+ hold_sv (csv->self, "_UNDEF_STR_HELD", val);
csv->undef_str = (byte *)cp;
if (SvUTF8 (val))
csv->undef_flg = 3;
}
else {
+ hold_sv (csv->self, "_UNDEF_STR_HELD", NULL);
csv->undef_str = NULL;
csv->undef_flg = 0;
}
break;
case CACHE_ID_comment_str:
- csv->comment_str = *cp ? (byte *)cp : NULL;
+ if (*cp) {
+ hold_sv (csv->self, "_COMMENT_STR_HELD", val);
+ csv->comment_str = (byte *)cp;
+ }
+ else {
+ hold_sv (csv->self, "_COMMENT_STR_HELD", NULL);
+ csv->comment_str = NULL;
+ }
break;
case CACHE_ID_types:
if (cp && len) {
+ hold_sv (csv->self, "_TYPES_HELD", val);
csv->types = cp;
csv->types_len = len;
}
else {
+ hold_sv (csv->self, "_TYPES_HELD", NULL);
csv->types = NULL;
csv->types_len = 0;
}
@@ -751,6 +781,7 @@
CH_SEP = *SvPV (*svp, len);
if ((svp = hv_fetchs (self, "sep", FALSE)) && *svp && SvOK
(*svp)) {
ptr = SvPV (*svp, len);
+ if (len > MAX_ATTR_LEN) croak ("INI - SEP too long"); /* 1006 */
(void)memcpy (csv->sep, ptr, len);
if (len > 1)
csv->sep_len = len;
@@ -767,6 +798,7 @@
}
if ((svp = hv_fetchs (self, "quote", FALSE)) && *svp && SvOK
(*svp)) {
ptr = SvPV (*svp, len);
+ if (len > MAX_ATTR_LEN) croak ("INI - QUOTE too long"); /* 1007 */
(void)memcpy (csv->quo, ptr, len);
if (len > 1)
csv->quo_len = len;
@@ -784,6 +816,7 @@
if ((svp = hv_fetchs (self, "eol", FALSE)) && *svp && SvOK
(*svp)) {
char *eol = SvPV (*svp, len);
+ if (len > MAX_ATTR_LEN) croak ("INI - EOL too long"); /* 1005 */
(void)memcpy (csv->eol, eol, len);
csv->eol_len = len;
if (len == 1 && *eol == CH_CR) {
@@ -800,19 +833,27 @@
if ((svp = hv_fetchs (self, "undef_str", FALSE)) && *svp && SvOK
(*svp)) {
/*if (sv && (SvOK (sv) || (
(SvGMAGICAL (sv) && (mg_get (sv), 1) && SvOK (sv)))))
{*/
+ hold_sv (self, "_UNDEF_STR_HELD", *svp);
csv->undef_str = (byte *)SvPV_nolen (*svp);
if (SvUTF8 (*svp))
csv->undef_flg = 3;
}
- else
+ else {
+ hold_sv (self, "_UNDEF_STR_HELD", NULL);
csv->undef_str = NULL;
+ }
- if ((svp = hv_fetchs (self, "comment_str", FALSE)) && *svp && SvOK
(*svp))
+ if ((svp = hv_fetchs (self, "comment_str", FALSE)) && *svp && SvOK
(*svp)) {
+ hold_sv (self, "_COMMENT_STR_HELD", *svp);
csv->comment_str = (byte *)SvPV_nolen (*svp);
- else
+ }
+ else {
+ hold_sv (self, "_COMMENT_STR_HELD", NULL);
csv->comment_str = NULL;
+ }
if ((svp = hv_fetchs (self, "_types", FALSE)) && *svp && SvOK
(*svp)) {
+ hold_sv (self, "_TYPES_HELD", *svp);
csv->types = SvPV (*svp, len);
csv->types_len = len;
}
@@ -1346,6 +1387,8 @@
csv->has_error_input = 1;
if (hv_store (csv->self, "_ERROR_INPUT", 12, csv->tmp, 0))
SvREFCNT_inc (csv->tmp);
+ else
+ SvREFCNT_dec (csv->tmp);
}
(void)SetDiagL (csv, xse, line);
} /* ParseError */
@@ -1569,7 +1612,7 @@
if (csv->sep_len) {
int x;
for (x = 0; x < csv->sep_len; x++)
- (void)sprintf (_sep + x * x, "%02x ", csv->sep[x]);
+ (void)sprintf (_sep + x * 3, "%02x ", csv->sep[x]);
}
else
(void)sprintf (_sep, "'%c' (0x%02x)", CH_SEP, CH_SEP);
@@ -2009,8 +2052,8 @@
(csv->bptr[1] == 'e' || csv->bptr[1] == 'E') &&
(csv->bptr[2] == 'p' || csv->bptr[2] == 'P') &&
csv->bptr[3] == '=') {
- char *sep = csv->bptr + 4;
- int lnu = csv->used - 5;
+ char *sep = csv->bptr + 4;
+ STRLEN lnu = csv->used > 5 ? csv->used - 5 : 0;
if (lnu <= MAX_ATTR_LEN) {
sep[lnu] = (char)0;
(void)memcpy (csv->sep, sep, lnu);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/ChangeLog
new/Text-CSV_XS-1.64/ChangeLog
--- old/Text-CSV_XS-1.62/ChangeLog 2026-04-29 09:29:21.000000000 +0200
+++ new/Text-CSV_XS-1.64/ChangeLog 2026-06-22 14:46:30.000000000 +0200
@@ -1,3 +1,14 @@
+1.64 - 2026-06-22, H.Merijn Brand
+ * Fix syntax error in csv2xlsx
+
+1.63 - 2026-06-22, H.Merijn Brand
+ * Check attribute lengths (memory protection)
+ * Minor code consistencies (not user-visible)
+ * Dropped support for 5.6.x and 5.8.0. Minimum perl is now 5.8.1
+ * Fix special str setting consistency for types, undef_str and
+ comment_str
+ * Characters []:*/\ are not allowed in XLSX sheet names
+
1.62 - 2026-04-29, H.Merijn Brand
* It is 2026
* Fix possible stack corruption (thanks leont) (issue 65)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/MANIFEST
new/Text-CSV_XS-1.64/MANIFEST
--- old/Text-CSV_XS-1.62/MANIFEST 2026-04-29 10:18:17.000000000 +0200
+++ new/Text-CSV_XS-1.64/MANIFEST 2026-06-22 14:48:23.000000000 +0200
@@ -43,6 +43,7 @@
t/90_csv.t Function csv () checks
t/91_csv_cb.t Callbacks with csv function
t/92_stream.t Streaming functionality
+t/99_mem.t Overlong attribute guard check
t/util.pl Extra test utilities
examples/csv2xls Script to onvert CSV files to M$Excel XLS
examples/csv2xlsx Script to onvert CSV files to M$Excel 2007+ XLSX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/META.json
new/Text-CSV_XS-1.64/META.json
--- old/Text-CSV_XS-1.62/META.json 2026-04-29 10:18:27.000000000 +0200
+++ new/Text-CSV_XS-1.64/META.json 2026-06-22 14:48:24.000000000 +0200
@@ -1,58 +1,30 @@
{
- "abstract" : "Comma-Separated Values manipulation routines",
- "generated_by" : "Author",
- "meta-spec" : {
- "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : 2
- },
- "provides" : {
- "Text::CSV_XS" : {
- "version" : "1.62",
- "file" : "CSV_XS.pm"
- }
- },
"dynamic_config" : 1,
+ "abstract" : "Comma-Separated Values manipulation routines",
"name" : "Text-CSV_XS",
- "version" : "1.62",
- "release_status" : "stable",
- "resources" : {
- "x_IRC" : "irc://irc.perl.org/#csv",
- "homepage" : "https://metacpan.org/pod/Text::CSV_XS",
- "license" : [
- "http://dev.perl.org/licenses/"
- ],
- "bugtracker" : {
- "web" : "https://github.com/Tux/Text-CSV_XS/issues"
- },
- "repository" : {
- "url" : "https://github.com/Tux/Text-CSV_XS",
- "web" : "https://github.com/Tux/Text-CSV_XS",
- "type" : "git"
- }
- },
"prereqs" : {
+ "configure" : {
+ "recommends" : {
+ "ExtUtils::MakeMaker" : "7.78"
+ },
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
"test" : {
"requires" : {
- "Tie::Scalar" : "0",
- "Test::More" : "0"
+ "Test::More" : "0",
+ "Tie::Scalar" : "0"
}
},
"runtime" : {
"recommends" : {
- "Encode" : "3.22"
+ "Encode" : "3.24"
},
"requires" : {
+ "XSLoader" : "0",
"IO::Handle" : "0",
- "perl" : "5.006001",
- "XSLoader" : "0"
- }
- },
- "configure" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- },
- "recommends" : {
- "ExtUtils::MakeMaker" : "7.78"
+ "perl" : "5.008001"
}
},
"build" : {
@@ -61,10 +33,38 @@
}
}
},
+ "release_status" : "stable",
"author" : [
"H.Merijn Brand <[email protected]>"
],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : 2
+ },
+ "version" : "1.64",
+ "generated_by" : "Author",
+ "provides" : {
+ "Text::CSV_XS" : {
+ "file" : "CSV_XS.pm",
+ "version" : "1.64"
+ }
+ },
"license" : [
"perl_5"
- ]
+ ],
+ "resources" : {
+ "x_IRC" : "irc://irc.perl.org/#csv",
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/Tux/Text-CSV_XS",
+ "web" : "https://github.com/Tux/Text-CSV_XS"
+ },
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
+ "homepage" : "https://metacpan.org/pod/Text::CSV_XS",
+ "bugtracker" : {
+ "web" : "https://github.com/Tux/Text-CSV_XS/issues"
+ }
+ }
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/META.yml
new/Text-CSV_XS-1.64/META.yml
--- old/Text-CSV_XS-1.62/META.yml 2026-04-29 10:18:27.000000000 +0200
+++ new/Text-CSV_XS-1.64/META.yml 2026-06-22 14:48:24.000000000 +0200
@@ -3,9 +3,9 @@
author:
- H.Merijn Brand <[email protected]>
build_requires:
- Config: 0
+ Config: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: Author, CPAN::Meta::Converter version 2.150013
license: perl
@@ -16,19 +16,19 @@
provides:
Text::CSV_XS:
file: CSV_XS.pm
- version: '1.62'
+ version: '1.64'
recommends:
- Encode: '3.22'
+ Encode: '3.24'
requires:
- IO::Handle: 0
- Test::More: 0
- Tie::Scalar: 0
- XSLoader: 0
- perl: '5.006001'
+ IO::Handle: '0'
+ Test::More: '0'
+ Tie::Scalar: '0'
+ XSLoader: '0'
+ perl: '5.008001'
resources:
IRC: irc://irc.perl.org/#csv
bugtracker: https://github.com/Tux/Text-CSV_XS/issues
homepage: https://metacpan.org/pod/Text::CSV_XS
license: http://dev.perl.org/licenses/
repository: https://github.com/Tux/Text-CSV_XS
-version: '1.62'
+version: '1.64'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/Makefile.PL
new/Text-CSV_XS-1.64/Makefile.PL
--- old/Text-CSV_XS-1.62/Makefile.PL 2026-04-29 10:17:14.000000000 +0200
+++ new/Text-CSV_XS-1.64/Makefile.PL 2026-05-03 10:08:59.000000000 +0200
@@ -2,7 +2,7 @@
# Copyright PROCURA B.V. (c) 2006-2026 H.Merijn Brand
-require 5.006001; # <- also see postamble at the bottom for META.yml
+require 5.008001; # <- also see postamble at the bottom for META.yml
use strict;
use charnames ":full";
@@ -145,7 +145,7 @@
' pod-spell-check --aspell --ispell',
'',
'ppport: ppport.h',
- ' perl ppport.h --compat-version=5.6.1 CSV_XS.xs',
+ ' perl ppport.h --compat-version=5.8.1 CSV_XS.xs',
'',
'checkmeta: spellcheck ppport.h',
' perl sandbox/genPPPort_h.pl',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/README new/Text-CSV_XS-1.64/README
--- old/Text-CSV_XS-1.62/README 2026-01-25 13:04:15.000000000 +0100
+++ new/Text-CSV_XS-1.64/README 2026-05-03 10:11:24.000000000 +0200
@@ -38,8 +38,9 @@
https://github.com/Tux/Text-CSV_XS/archive/master.tar.gz
Prerequisites:
- perl 5.6.1 or up.
+ perl 5.8.1 or up.
+ Last version to support perl 5.6.x was Text::CSV_XS-1.62.
You can have a working Test::More for 5.6.1 by requiring version
Test::Harness-2.64 and Test::Simple-0.90
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/cpanfile
new/Text-CSV_XS-1.64/cpanfile
--- old/Text-CSV_XS-1.62/cpanfile 2026-04-29 10:18:17.000000000 +0200
+++ new/Text-CSV_XS-1.64/cpanfile 2026-06-22 14:48:24.000000000 +0200
@@ -1,7 +1,7 @@
requires "IO::Handle";
requires "XSLoader";
-recommends "Encode" => "3.22";
+recommends "Encode" => "3.24";
on "configure" => sub {
requires "ExtUtils::MakeMaker";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/examples/csv2xlsx
new/Text-CSV_XS-1.64/examples/csv2xlsx
--- old/Text-CSV_XS-1.62/examples/csv2xlsx 2026-01-25 13:02:56.000000000
+0100
+++ new/Text-CSV_XS-1.64/examples/csv2xlsx 2026-06-22 14:46:01.000000000
+0200
@@ -1,12 +1,12 @@
#!/pro/bin/perl
# csv2xlsx: Convert csv to xlsx
-# (m)'23 Copyright H.M.Brand 2007-2026
+# (m)'26 Copyright H.M.Brand 2007-2026
use 5.014000;
use warnings;
-our $VERSION = "1.23 - 2023-11-14";
+our $VERSION = "1.24 - 2026-05-19";
sub usage {
my $err = shift and select STDERR;
@@ -356,7 +356,9 @@
}
unless ($wks) {
- $wks = $wbk->add_worksheet ($sheetname);
+ # characters []:*/\ are not allowed in sheet names
+ my $sn = $sheetname =~ tr{[]:*?/\\}{_}r =~ s{__+}{_}gr;
+ $wks = $wbk->add_worksheet ($sn);
$utf && !$wks->can ("write_unicode") and $utf = 0;
($h, $w, @w) = (0, 1);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/20_file.t
new/Text-CSV_XS-1.64/t/20_file.t
--- old/Text-CSV_XS-1.62/t/20_file.t 2022-09-13 09:37:43.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/20_file.t 2026-05-03 09:46:04.000000000 +0200
@@ -134,13 +134,12 @@
[ 24, 0, 2026, qq{"\b"} ],
) {
my ($tst, $valid, $err, $str) = @$_;
- my $raw = $] < 5.008 ? "" : ":raw";
- open FH, ">$raw", $tfn or die "$tfn: $!";
+ open FH, ">:raw", $tfn or die "$tfn: $!";
print FH $str;
close FH;
$csv = Text::CSV_XS->new ({ escape_char => "+" });
- open FH, "<$raw", $tfn or die "$tfn: $!";
+ open FH, "<:raw", $tfn or die "$tfn: $!";
my $row = $csv->getline (*FH);
close FH;
my @err = $csv->error_diag;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/21_lexicalio.t
new/Text-CSV_XS-1.64/t/21_lexicalio.t
--- old/Text-CSV_XS-1.62/t/21_lexicalio.t 2022-09-13 09:37:43.000000000
+0200
+++ new/Text-CSV_XS-1.64/t/21_lexicalio.t 2026-05-03 09:46:22.000000000
+0200
@@ -134,13 +134,12 @@
[ 24, 0, 2026, qq{"\b"} ],
) {
my ($tst, $valid, $err, $str) = @$_;
- my $raw = $] < 5.008 ? "" : ":raw";
- open my $io, ">$raw", $tfn or die "$tfn: $!";
+ open my $io, ">:raw", $tfn or die "$tfn: $!";
print $io $str;
close $io;
$csv = Text::CSV_XS->new ({ escape_char => "+" });
- open $io, "<$raw", $tfn or die "$tfn: $!";
+ open $io, "<:raw", $tfn or die "$tfn: $!";
my $row = $csv->getline ($io);
close $io;
my @err = $csv->error_diag;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/22_scalario.t
new/Text-CSV_XS-1.64/t/22_scalario.t
--- old/Text-CSV_XS-1.62/t/22_scalario.t 2022-09-13 09:37:43.000000000
+0200
+++ new/Text-CSV_XS-1.64/t/22_scalario.t 2026-05-03 10:14:19.000000000
+0200
@@ -10,7 +10,6 @@
BEGIN {
unless (exists $Config{useperlio} &&
defined $Config{useperlio} &&
- $] >= 5.008 && # perlio was experimental in 5.6.2,
but not reliable
$Config{useperlio} eq "define") {
plan skip_all => "No reliable perlIO available";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/45_eol.t
new/Text-CSV_XS-1.64/t/45_eol.t
--- old/Text-CSV_XS-1.62/t/45_eol.t 2025-01-20 17:05:20.000000000 +0100
+++ new/Text-CSV_XS-1.64/t/45_eol.t 2026-05-03 09:57:04.000000000 +0200
@@ -86,30 +86,27 @@
ok ($csv->parse (qq{"x" \r}), "Trailing \\r with no escape char");
}
-SKIP: {
- $] < 5.008 and skip "\$\\ tests don't work in perl 5.6.x and older", 2;
- { local $\ = "#\r\n";
- my $csv = Text::CSV_XS->new ();
- open my $fh, ">", $tfn or die "$tfn: $!\n";
- $csv->print ($fh, [ "a", 1 ]);
- close $fh;
- open $fh, "<", $tfn or die "$tfn: $!\n";
- local $/;
- is (<$fh>, "a,1#\r\n", "Strange \$\\");
- close $fh;
- unlink $tfn;
- }
- { local $\ = "#\r\n";
- my $csv = Text::CSV_XS->new ({ eol => $\ });
- open my $fh, ">", $tfn or die "$tfn: $!\n";
- $csv->print ($fh, [ "a", 1 ]);
- close $fh;
- open $fh, "<", $tfn or die "$tfn: $!\n";
- local $/;
- is (<$fh>, "a,1#\r\n", "Strange \$\\ + eol");
- close $fh;
- unlink $tfn;
- }
+{ local $\ = "#\r\n";
+ my $csv = Text::CSV_XS->new ();
+ open my $fh, ">", $tfn or die "$tfn: $!\n";
+ $csv->print ($fh, [ "a", 1 ]);
+ close $fh;
+ open $fh, "<", $tfn or die "$tfn: $!\n";
+ local $/;
+ is (<$fh>, "a,1#\r\n", "Strange \$\\");
+ close $fh;
+ unlink $tfn;
+ }
+{ local $\ = "#\r\n";
+ my $csv = Text::CSV_XS->new ({ eol => $\ });
+ open my $fh, ">", $tfn or die "$tfn: $!\n";
+ $csv->print ($fh, [ "a", 1 ]);
+ close $fh;
+ open $fh, "<", $tfn or die "$tfn: $!\n";
+ local $/;
+ is (<$fh>, "a,1#\r\n", "Strange \$\\ + eol");
+ close $fh;
+ unlink $tfn;
}
$/ = $def_rs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/46_eol_si.t
new/Text-CSV_XS-1.64/t/46_eol_si.t
--- old/Text-CSV_XS-1.62/t/46_eol_si.t 2024-12-18 15:48:27.000000000 +0100
+++ new/Text-CSV_XS-1.64/t/46_eol_si.t 2026-05-03 10:14:23.000000000 +0200
@@ -9,7 +9,6 @@
BEGIN {
unless (exists $Config{useperlio} &&
defined $Config{useperlio} &&
- $] >= 5.008 && # perlio was experimental in 5.6.2,
but not reliable
$Config{useperlio} eq "define") {
plan skip_all => "No reliable perlIO available";
}
@@ -100,30 +99,27 @@
ok ($csv->parse (qq{"x" \r}), "Trailing \\r with no escape char");
}
-SKIP: {
- $] < 5.008 and skip "\$\\ tests don't work in perl 5.6.x and older", 2;
- { local $\ = "#\r\n";
- my $csv = Text::CSV_XS->new ();
- $file = "";
- open my $fh, ">", \$file or die "IO: $!\n";
- $csv->print ($fh, [ "a", 1 ]);
- close $fh;
- open $fh, "<", \$file or die "IO: $!\n";
- local $/;
- is (<$fh>, "a,1#\r\n", "Strange \$\\");
- close $fh;
- }
- { local $\ = "#\r\n";
- my $csv = Text::CSV_XS->new ({ eol => $\ });
- $file = "";
- open my $fh, ">", \$file or die "IO: $!\n";
- $csv->print ($fh, [ "a", 1 ]);
- close $fh;
- open $fh, "<", \$file or die "IO: $!\n";
- local $/;
- is (<$fh>, "a,1#\r\n", "Strange \$\\ + eol");
- close $fh;
- }
+{ local $\ = "#\r\n";
+ my $csv = Text::CSV_XS->new ();
+ $file = "";
+ open my $fh, ">", \$file or die "IO: $!\n";
+ $csv->print ($fh, [ "a", 1 ]);
+ close $fh;
+ open $fh, "<", \$file or die "IO: $!\n";
+ local $/;
+ is (<$fh>, "a,1#\r\n", "Strange \$\\");
+ close $fh;
+ }
+{ local $\ = "#\r\n";
+ my $csv = Text::CSV_XS->new ({ eol => $\ });
+ $file = "";
+ open my $fh, ">", \$file or die "IO: $!\n";
+ $csv->print ($fh, [ "a", 1 ]);
+ close $fh;
+ open $fh, "<", \$file or die "IO: $!\n";
+ local $/;
+ is (<$fh>, "a,1#\r\n", "Strange \$\\ + eol");
+ close $fh;
}
$/ = $def_rs;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/50_utf8.t
new/Text-CSV_XS-1.64/t/50_utf8.t
--- old/Text-CSV_XS-1.62/t/50_utf8.t 2022-09-13 09:37:35.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/50_utf8.t 2026-05-03 09:59:50.000000000 +0200
@@ -117,9 +117,7 @@
SKIP: {
my $out = "";
- my $isutf8 = $] < 5.008001 ?
- sub { !$_[0]; } : # utf8::is_utf8 () not available in 5.8.0
- sub { utf8::is_utf8 ($out); };
+ my $isutf8 = sub { utf8::is_utf8 ($out); };
ok ($csv->auto_diag (1), "auto diag");
ok ($csv->binary (1), "set binary");
ok ($csv->bind_columns (\$out), "bind");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/67_emptrow.t
new/Text-CSV_XS-1.64/t/67_emptrow.t
--- old/Text-CSV_XS-1.62/t/67_emptrow.t 2026-04-26 15:47:10.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/67_emptrow.t 2026-05-03 10:00:18.000000000 +0200
@@ -6,12 +6,7 @@
use Test::More;
BEGIN {
- if ($] < 5.008001) {
- plan skip_all => "This test unit requires perl-5.8.1 or higher";
- }
- else {
- plan tests => 58;
- }
+ plan tests => 58;
use_ok "Text::CSV_XS", ("csv");
plan skip_all => "Cannot load Text::CSV_XS" if $@;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/68_header.t
new/Text-CSV_XS-1.64/t/68_header.t
--- old/Text-CSV_XS-1.62/t/68_header.t 2023-08-08 09:02:07.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/68_header.t 2026-05-03 10:00:25.000000000 +0200
@@ -6,12 +6,7 @@
use Test::More;
BEGIN {
- if ($] < 5.008001) {
- plan skip_all => "This test unit requires perl-5.8.1 or higher";
- }
- else {
- plan tests => 32;
- }
+ plan tests => 32;
use_ok "Text::CSV_XS", "csv";
require "./t/util.pl";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/70_rt.t
new/Text-CSV_XS-1.64/t/70_rt.t
--- old/Text-CSV_XS-1.62/t/70_rt.t 2022-09-13 09:37:35.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/70_rt.t 2026-05-03 10:01:11.000000000 +0200
@@ -463,16 +463,13 @@
{ # http://rt.cpan.org/Ticket/Display.html?id=115953
$rt = 115953; # Space stripped from middle of field value with
allow_whitespace and allow_loose_quotes
- SKIP: {
- $] < 5.006002 and skip "unreliable in perl $]", 2;
- my $csv = Text::CSV_XS->new ({
- allow_loose_quotes => 1,
- escape_char => undef,
- allow_whitespace => 1,
- });
- ok ($csv->parse ($input{$rt}[0]), "parse valid content");
- is_deeply ([ $csv->fields ], [ q{foo "bar" baz} ], "Data");
- }
+ my $csv = Text::CSV_XS->new ({
+ allow_loose_quotes => 1,
+ escape_char => undef,
+ allow_whitespace => 1,
+ });
+ ok ($csv->parse ($input{$rt}[0]), "parse valid content");
+ is_deeply ([ $csv->fields ], [ q{foo "bar" baz} ], "Data");
}
{ # http://rt.cpan.org/Ticket/Display.html?id=120655
@@ -493,39 +490,35 @@
{ # http://rt.cpan.org/Ticket/Display.html?id=123320
$rt = 123320; # ext::CSV_XS bug w/Mac format files
- SKIP: {
- $] < 5.008001 and skip "unreliable in perl $]", 4;
-
- open my $fh, ">", $tfn or die "$tfn: $!\n";
- print $fh join "\r" =>
- q{col1,col2,col3,},
- q{"One","","Three"},
- q{"Four","Five and a half","Six"},
- q{};
- close $fh;
-
- ok (my $csv = Text::CSV_XS->new ({ auto_diag => 1, eol => "\r", }),
"new");
-
- my @msg;
- local $SIG{__WARN__} = sub { push @msg, @_; };
-
- open $fh, "<", $tfn or die "$!\n";
- my @hdr = eval { $csv->header ($fh); };
- is (scalar @hdr, 0, "Empty field in header");
- is (($csv->error_diag)[0], 1012, "error 1012");
- close $fh;
-
- open $fh, ">", $tfn or die "$tfn: $!\n";
- print $fh join "\r" =>
- q{col1,col2,col3},
- q{"One","Two","Three"},
- "";
- close $fh;
- open $fh, "<", $tfn or die "$!\n";
- @hdr = eval { $csv->header ($fh); };
- is_deeply (\@hdr, [qw( col1 col2 col3 )], "Header is ok");
- close $fh;
- }
+ open my $fh, ">", $tfn or die "$tfn: $!\n";
+ print $fh join "\r" =>
+ q{col1,col2,col3,},
+ q{"One","","Three"},
+ q{"Four","Five and a half","Six"},
+ q{};
+ close $fh;
+
+ ok (my $csv = Text::CSV_XS->new ({ auto_diag => 1, eol => "\r", }), "new");
+
+ my @msg;
+ local $SIG{__WARN__} = sub { push @msg, @_; };
+
+ open $fh, "<", $tfn or die "$!\n";
+ my @hdr = eval { $csv->header ($fh); };
+ is (scalar @hdr, 0, "Empty field in header");
+ is (($csv->error_diag)[0], 1012, "error 1012");
+ close $fh;
+
+ open $fh, ">", $tfn or die "$tfn: $!\n";
+ print $fh join "\r" =>
+ q{col1,col2,col3},
+ q{"One","Two","Three"},
+ "";
+ close $fh;
+ open $fh, "<", $tfn or die "$!\n";
+ @hdr = eval { $csv->header ($fh); };
+ is_deeply (\@hdr, [qw( col1 col2 col3 )], "Header is ok");
+ close $fh;
}
__END__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/78_fragment.t
new/Text-CSV_XS-1.64/t/78_fragment.t
--- old/Text-CSV_XS-1.62/t/78_fragment.t 2017-06-13 17:25:26.000000000
+0200
+++ new/Text-CSV_XS-1.64/t/78_fragment.t 2026-05-03 10:14:28.000000000
+0200
@@ -10,7 +10,6 @@
BEGIN {
unless (exists $Config{useperlio} &&
defined $Config{useperlio} &&
- $] >= 5.008 && # perlio was experimental in 5.6.2,
but not reliable
$Config{useperlio} eq "define") {
plan skip_all => "No reliable perlIO available";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/80_diag.t
new/Text-CSV_XS-1.64/t/80_diag.t
--- old/Text-CSV_XS-1.62/t/80_diag.t 2024-12-06 11:05:24.000000000 +0100
+++ new/Text-CSV_XS-1.64/t/80_diag.t 2026-05-03 10:01:45.000000000 +0200
@@ -269,41 +269,38 @@
}
}
-SKIP: {
- $] < 5.008 and skip qq{$] does not support ScalarIO}, 24;
- foreach my $key ({}, sub {}, []) {
- my $csv = Text::CSV_XS->new;
- my $x = eval { $csv->csv (in => \"a,b", key => $key) };
- is ($x, undef, "Invalid key");
- my @diag = $csv->error_diag;
- is ($diag[0], 1501, "Invalid key type");
- }
+foreach my $key ({}, sub {}, []) {
+ my $csv = Text::CSV_XS->new;
+ my $x = eval { $csv->csv (in => \"a,b", key => $key) };
+ is ($x, undef, "Invalid key");
+ my @diag = $csv->error_diag;
+ is ($diag[0], 1501, "Invalid key type");
+ }
- { my $csv = Text::CSV_XS->new;
- my $x = eval { $csv->csv (in => \"a,b", value => "b") };
- is ($x, undef, "Value without key");
- my @diag = $csv->error_diag;
- is ($diag[0], 1502, "No key");
- }
+{ my $csv = Text::CSV_XS->new;
+ my $x = eval { $csv->csv (in => \"a,b", value => "b") };
+ is ($x, undef, "Value without key");
+ my @diag = $csv->error_diag;
+ is ($diag[0], 1502, "No key");
+ }
- foreach my $val ({}, sub {}, []) {
- my $csv = Text::CSV_XS->new;
- my $x = eval { $csv->csv (in => \"a,b", key => "a", value => $val) };
- is ($x, undef, "Invalid value");
- my @diag = $csv->error_diag;
- is ($diag[0], 1503, "Invalid value type");
- }
+foreach my $val ({}, sub {}, []) {
+ my $csv = Text::CSV_XS->new;
+ my $x = eval { $csv->csv (in => \"a,b", key => "a", value => $val) };
+ is ($x, undef, "Invalid value");
+ my @diag = $csv->error_diag;
+ is ($diag[0], 1503, "Invalid value type");
+ }
- foreach my $ser ("die", 4) {
- ok (my $csv = Text::CSV_XS->new ({ skip_empty_rows => $ser }),
- "New CSV for SER $ser");
- is (eval { $csv->csv (in => \"\n") }, undef,
- "Parse empty line for SER
$ser");
- like ($@, qr{^Empty row}, "Message");
- my @diag = $csv->error_diag;
- is ($diag[0], 2015, "Empty row");
- like ($diag[1], qr{^ERW - Empty row}, "Error description");
- }
+foreach my $ser ("die", 4) {
+ ok (my $csv = Text::CSV_XS->new ({ skip_empty_rows => $ser }),
+ "New CSV for SER $ser");
+ is (eval { $csv->csv (in => \"\n") }, undef,
+ "Parse empty line for SER $ser");
+ like ($@, qr{^Empty row}, "Message");
+ my @diag = $csv->error_diag;
+ is ($diag[0], 2015, "Empty row");
+ like ($diag[1], qr{^ERW - Empty row}, "Error description");
}
# Issue 19: auto_diag > 1 does not die if ->header () is used
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/90_csv.t
new/Text-CSV_XS-1.64/t/90_csv.t
--- old/Text-CSV_XS-1.62/t/90_csv.t 2026-04-26 16:26:38.000000000 +0200
+++ new/Text-CSV_XS-1.64/t/90_csv.t 2026-05-03 10:14:34.000000000 +0200
@@ -33,15 +33,13 @@
{ foo => 2, bar => "a b", baz => "" },
];
-SKIP: for my $io ([ $tfn, "file" ], [ \*FH, "globref" ], [ *FH, "glob" ], [
\$data, "ScalarIO"] ) {
- $] < 5.008 && ref $io->[0] eq "SCALAR" and skip "No ScalarIO support for
$]", 1;
+for my $io ([ $tfn, "file" ], [ \*FH, "globref" ], [ *FH, "glob" ], [ \$data,
"ScalarIO"] ) {
open FH, "<", $tfn or die "$tfn: $!\n";
is_deeply (csv ({ in => $io->[0] }), $aoa, "AOA $io->[1]");
close FH;
}
-SKIP: for my $io ([ $tfn, "file" ], [ \*FH, "globref" ], [ *FH, "glob" ], [
\$data, "ScalarIO"] ) {
- $] < 5.008 && ref $io->[0] eq "SCALAR" and skip "No ScalarIO support for
$]", 1;
+for my $io ([ $tfn, "file" ], [ \*FH, "globref" ], [ *FH, "glob" ], [ \$data,
"ScalarIO"] ) {
open FH, "<", $tfn or die "$tfn: $!\n";
is_deeply (csv (in => $io->[0], headers => "auto"), $aoh, "AOH $io->[1]");
close FH;
@@ -56,8 +54,7 @@
is_deeply (csv (file => $tfn, headers => "skip"), \@aoa, "AOA skip");
is_deeply (csv (file => $tfn, fragment => "row=2-3"), \@aoa, "AOA fragment");
-if ($] >= 5.008001) {
- my @hdr;
+{ my @hdr;
ok (my $ref = csv (in => $tfn, bom => 1), "csv (-- not keeping header)");
is_deeply (\@hdr, [], "Should still be empty");
foreach my $alias (qw( keep_headers keep_column_names kh )) {
@@ -77,22 +74,14 @@
is ($buf, $data, "Headers kept for $alias");
}
}
-else {
- ok (1, q{This perl cannot do scalar IO}) for 1..26;
- }
-if ($] >= 5.008001) {
- is_deeply (csv (in => $tfn, encoding => "utf-8", headers => ["a", "b",
"c"],
+{ is_deeply (csv (in => $tfn, encoding => "utf-8", headers => ["a", "b",
"c"],
fragment => "row=2", sep_char => ","),
[{ a => 1, b => 2, c => 3 }], "AOH headers fragment");
is_deeply (csv (in => $tfn, enc => "utf-8", headers => ["a", "b",
"c"],
fragment => "row=2", sep_char => ","),
[{ a => 1, b => 2, c => 3 }], "AOH headers fragment");
}
-else {
- ok (1, q{This perl does not support open with "<:encoding(...)"});
- ok (1, q{This perl does not support open with "<:encoding(...)"});
- }
ok (csv (in => $aoa, out => $tfn), "AOA out file");
is_deeply (csv (in => $tfn), $aoa, "AOA parse out");
@@ -127,9 +116,7 @@
unlink $tfn;
# Basic "key" checks
-SKIP: {
- $] < 5.008 and skip "No ScalarIO support for $]", 4;
- # Simple key
+{ # Simple key
is_deeply (csv (in => \"key,value\n1,2\n", key => "key"),
{ 1 => { key => 1, value => 2 }}, "key");
is_deeply (csv (in => \"1,2\n", key => "key", headers => [qw( key value
)]),
@@ -141,9 +128,7 @@
{ "2:3" => { a => 2, b => 3, value => 2 }}, "key list");
}
# Basic "value" checks
-SKIP: {
- $] < 5.008001 and skip "No ScalarIO support for 'value's in $]", 5;
- # Simple key simple value
+{ # Simple key simple value
is_deeply (csv (in => \"key,value\n1,2\n", key => "key", value => "value"),
{ 1 => 2 }, "key:value");
is_deeply (csv (in => \"1,2\n", key => "key", headers => [qw( key value
)], value => "value"),
@@ -191,7 +176,6 @@
is ($csv->eol, "\r\n", "default eol");
} # check
- # Note that 5.6.x writes to a *file* named SCALAR(0x50414A10)
open my $fh, ">", \my $out or die "IO: $!\n";
csv (in => [[1,2]], out => $fh, on_in => \&check);
@@ -200,7 +184,6 @@
csv (in => [[1,2]], out => $fh, on_in => \&check, auto_diag => 0,
($] >= 5.008004 ? (encoding => "utf-8") : ()));
}
-$] < 5.008 and unlink glob "SCALAR(*)";
# errors
{ my $err = "";
@@ -299,15 +282,12 @@
like ($err, qr{Not a GLOB}i, "Not a GLOB");
$err = "";
- SKIP: {
- $] < 5.008 and skip "$] does not support bom here", 2;
- $x = [[ 1, 2 ]]; # Add hashes to arrays
- $r = eval { csv (in => $tfn, out => $x, bom => 1); };
- $err =~ s{\s+at\s+\S+\s+line\s+\d+\.\r?\n?\Z}{};
- is ($r, undef, "Cannot add hashes to arrays");
- like ($err, qr{type mismatch}, "HASH != ARRAY");
- $err = "";
- }
+ $x = [[ 1, 2 ]]; # Add hashes to arrays
+ $r = eval { csv (in => $tfn, out => $x, bom => 1); };
+ $err =~ s{\s+at\s+\S+\s+line\s+\d+\.\r?\n?\Z}{};
+ is ($r, undef, "Cannot add hashes to arrays");
+ like ($err, qr{type mismatch}, "HASH != ARRAY");
+ $err = "";
$x = [{ a => 1, b => 2 }]; # Add arrays to hashes
$r = eval { csv (in => $tfn, out => $x); };
@@ -320,7 +300,6 @@
eval {
exists $Config{useperlio} &&
defined $Config{useperlio} &&
- $] >= 5.008 &&
$Config{useperlio} eq "define" or skip "No scalar ref in this perl", 5;
my $out = "";
open my $fh, ">", \$out or die "IO: $!\n";
@@ -386,9 +365,7 @@
is (-s $ofn, 0, "No data results in an empty file");
unlink $ofn;
- SKIP: {
- $] <= 5.008 and skip qq{$] does not support ScalarIO}, 6;
- my $aoa = [[ 1, 2 ]];
+ { my $aoa = [[ 1, 2 ]];
is (csv (in => \"3,4", out => $aoa), $aoa, "return AOA");
is_deeply ($aoa, [[ 1, 2 ], [ 3, 4 ]], "Add to AOA");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/91_csv_cb.t
new/Text-CSV_XS-1.64/t/91_csv_cb.t
--- old/Text-CSV_XS-1.62/t/91_csv_cb.t 2025-11-03 09:45:29.000000000 +0100
+++ new/Text-CSV_XS-1.64/t/91_csv_cb.t 2026-05-03 10:06:22.000000000 +0200
@@ -71,28 +71,22 @@
{ foo => 1, bar => 2, baz => 3 },
], "AOH with filter on column name last line does not match");
-SKIP: {
- $] < 5.008001 and skip "No HOH/xx support in $]", 3;
- is_deeply (csv (in => $tfn, headers => "lc"),
- [ { foo => 1, bar => 2, baz => 3 },
- { foo => 2, bar => "a b", baz => "" }],
- "AOH with lc headers");
- is_deeply (csv (in => $tfn, headers => "uc"),
- [ { FOO => 1, BAR => 2, BAZ => 3 },
- { FOO => 2, BAR => "a b", BAZ => "" }],
- "AOH with lc headers");
- is_deeply (csv (in => $tfn, headers => sub { lcfirst uc $_[0] }),
- [ { fOO => 1, bAR => 2, bAZ => 3 },
- { fOO => 2, bAR => "a b", bAZ => "" }],
- "AOH with mangled headers");
- }
-
-SKIP: {
- $] < 5.008001 and skip "No BOM support in $]", 1;
- is_deeply (csv (in => $tfn, munge => { bar => "boo" }),
- [{ baz => 3, boo => 2, foo => 1 },
- { baz => "", boo => "a b", foo => 2 }], "Munge with hash");
- }
+is_deeply (csv (in => $tfn, headers => "lc"),
+ [ { foo => 1, bar => 2, baz => 3 },
+ { foo => 2, bar => "a b", baz => "" }],
+ "AOH with lc headers");
+is_deeply (csv (in => $tfn, headers => "uc"),
+ [ { FOO => 1, BAR => 2, BAZ => 3 },
+ { FOO => 2, BAR => "a b", BAZ => "" }],
+ "AOH with lc headers");
+is_deeply (csv (in => $tfn, headers => sub { lcfirst uc $_[0] }),
+ [ { fOO => 1, bAR => 2, bAZ => 3 },
+ { fOO => 2, bAR => "a b", bAZ => "" }],
+ "AOH with mangled headers");
+
+is_deeply (csv (in => $tfn, munge => { bar => "boo" }),
+ [{ baz => 3, boo => 2, foo => 1 },
+ { baz => "", boo => "a b", foo => 2 }], "Munge with hash");
open $fh, ">>", $tfn or die "$tfn: $!";
print $fh <<"EOD";
@@ -139,9 +133,7 @@
});
}
# Check content ref in on_in AOH with aliases %_
-SKIP: {
- $] < 5.008001 and skip "No AOH/alias support in $]", 7; # 6 in on_in, 1
is_deeply
- %_ = ( brt => 42 );
+{ %_ = ( brt => 42 );
my $aoa = csv (
in => $tfn,
headers => "auto",
@@ -152,13 +144,11 @@
is_deeply (\%_, { brt => 42 }, "%_ restored");
}
-SKIP: {
- $] < 5.008001 and skip "Too complicated test for $]", 2;
- # Add to %_ in callback
- # And test bizarre (but allowed) attribute combinations
- # Most of them can be either left out or done more efficiently in
- # a different way
- my $xcsv = Text::CSV_XS->new;
+# Add to %_ in callback
+# And test bizarre (but allowed) attribute combinations
+# Most of them can be either left out or done more efficiently in
+# a different way
+{ my $xcsv = Text::CSV_XS->new;
is_deeply (csv (in => $tfn,
seps => [ ",", ";" ],
munge => "uc",
@@ -183,10 +173,7 @@
"AOH with addition to %_ in on_in");
}
-
-SKIP: {
- $] < 5.008001 and skip "Too complicated test for $]", 2;
- ok (my $hr = csv (in => $tfn, key => "foo", on_in => sub {
+{ ok (my $hr = csv (in => $tfn, key => "foo", on_in => sub {
$_[1]{quz} = "B"; $_{ziq} = 2; }),
"Get into hashref with key and on_in");
is_deeply ($hr->{8}, {qw( bar 13 baz 18 foo 8 quz B ziq 2 )},
@@ -208,9 +195,7 @@
EOD
close $fh;
-SKIP: {
- $] < 5.008001 and skip "Too complicated test for $]", 4;
- is_deeply (csv (in => $tfn, filter => "not_blank"),
+{ is_deeply (csv (in => $tfn, filter => "not_blank"),
[[3,3,3],[5,7,9],["",""],["",""],["",""," ",""],
["","",""],["",""," ",""],[8,13,18]],
"filter => not_blank");
@@ -260,15 +245,11 @@
my $aoa = csv (in => $tfn, filter => { 0 => sub { $n++; 0; }});
is ($n, 4, "Count rows with filter hash");
}
-SKIP: {
- $] < 5.008001 and skip "Too complicated test for $]", 1;
- my $n = 0;
+{ my $n = 0;
my $aoa = csv (in => $tfn, filter => sub { $n++; 0; });
is ($n, 4, "Count rows with filter sub");
}
-SKIP: {
- $] < 5.008001 and skip "Too complicated test for $]", 1;
- my $n = 0;
+{ my $n = 0;
csv (in => $tfn, on_in => sub { $n++; 0; }, out => \"skip");
is ($n, 4, "Count rows with on_in and skipped out");
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-CSV_XS-1.62/t/99_mem.t
new/Text-CSV_XS-1.64/t/99_mem.t
--- old/Text-CSV_XS-1.62/t/99_mem.t 1970-01-01 01:00:00.000000000 +0100
+++ new/Text-CSV_XS-1.64/t/99_mem.t 2026-05-03 12:59:48.000000000 +0200
@@ -0,0 +1,47 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 12;
+use Text::CSV_XS;
+
+foreach my $key (qw( sep quote eol )) {
+ my $csv = Text::CSV_XS->new ({ binary => 1 });
+ $csv->{$key} = "X" x 8000;
+ my $input = "a,b,c\n";
+ open my $fh, "<", \$input;
+ eval {
+ my $rv = $csv->getline ($fh);
+ diag " $key: rv=", (defined $rv ? "OK" : "undef"), "\n";
+ };
+ like ($@, qr{INI - \U$key\E too long},
+ "Cannot set $key to a value longer than 16");
+ }
+
+{ # Aggressive lifetime probe for csv->undef_str
+ my $csv = Text::CSV_XS->new ({ binary => 1 });
+
+ my $marker = "U" . ("X" x 4096);
+ ok ($csv->undef_str ($marker), "Set undef_str");
+ ok ($csv->combine ("a", undef, "c"),"Forces cache build");
+ ok (my $str = $csv->string, "Combined");
+ like ($str, qr{^a,UXXXXXXX}, "Expected content");
+ is (length $str, 4101, "Expected length");
+
+ # Now drop the only remaining ref to the SV holding our 4097-byte PV.
+ $marker = undef; # caller's lexical drops to 0 (no other
refs except hash)
+ delete $csv->{undef_str}; # hash drops its ref ? SV freed if no
held ref
+
+ # Allocator pressure to recycle the freed region with attacker bytes.
+ my @junk = map { "GARBAGE_" . ("Z" x 4080) . "_$_" } 1..200;
+ @junk = ();
+
+ # Trigger Combine path that reads csv->undef_str
+ ok ($csv->combine ("a", undef, "c"),"Combine again");
+ ok (my $out = $csv->string, "Get string");
+ # If memory was overwritten, the second output's middle field will not
+ # match the original "U...XXX...". Compare a known prefix.
+ like ($str, qr{^a,UXXXXXXX}, "Expected content");
+ is (length $out, 4101, "Expected length");
+ }
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.gKywUZ/_old 2026-06-30 15:11:52.444874399 +0200
+++ /var/tmp/diff_new_pack.gKywUZ/_new 2026-06-30 15:11:52.452874670 +0200
@@ -1,6 +1,6 @@
-mtime: 1778617511
-commit: 859adc7b3357aeb070716362051c8ad374c5b9a339931c207448d0e6f169530a
+mtime: 1782204035
+commit: dd9e6bae88885ec41e68c1b33573872143c2a21d0d5273919cfd4fbae255594f
url: https://src.opensuse.org/perl/perl-Text-CSV_XS
-revision: 859adc7b3357aeb070716362051c8ad374c5b9a339931c207448d0e6f169530a
+revision: dd9e6bae88885ec41e68c1b33573872143c2a21d0d5273919cfd4fbae255594f
projectscmsync: https://src.opensuse.org/perl/_ObsPrj
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-06-23 10:40:35.000000000 +0200
@@ -0,0 +1 @@
+.osc