r31739 - in /branches/upstream/libtext-csv-xs-perl/current: CSV_XS.pm CSV_XS.xs ChangeLog META.yml ppport.h t/70_rt.t
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sun Mar 8 22:45:39 UTC 2009
Author: ansgar-guest
Date: Sun Mar 8 22:45:36 2009
New Revision: 31739
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31739
Log:
[svn-upgrade] Integrating new upstream version, libtext-csv-xs-perl (0.61)
Modified:
branches/upstream/libtext-csv-xs-perl/current/CSV_XS.pm
branches/upstream/libtext-csv-xs-perl/current/CSV_XS.xs
branches/upstream/libtext-csv-xs-perl/current/ChangeLog
branches/upstream/libtext-csv-xs-perl/current/META.yml
branches/upstream/libtext-csv-xs-perl/current/ppport.h
branches/upstream/libtext-csv-xs-perl/current/t/70_rt.t
Modified: branches/upstream/libtext-csv-xs-perl/current/CSV_XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/CSV_XS.pm?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/CSV_XS.pm (original)
+++ branches/upstream/libtext-csv-xs-perl/current/CSV_XS.pm Sun Mar 8 22:45:36 2009
@@ -30,7 +30,7 @@
use Carp;
use vars qw( $VERSION @ISA );
-$VERSION = "0.60";
+$VERSION = "0.61";
@ISA = qw( DynaLoader );
bootstrap Text::CSV_XS $VERSION;
@@ -141,6 +141,7 @@
{
my ($self, $name, $val) = @_;
$self->{$name} = $val;
+ $self->{_CACHE} or return;
my @cache = unpack "C*", $self->{_CACHE};
my $i = $_cache_id{$name};
$cache[$i++] = $_ for unpack "C*", pack "N", $val;
@@ -944,15 +945,16 @@
Similar to combine, but it expects an array ref as input (not an array!)
and the resulting string is not really created, but immediately written
to the I<$io> object, typically an IO handle or any other object that
-offers a I<print> method. Note, this implies that the following is wrong:
+offers a I<print> method. Note, this implies that the following is wrong
+in perl 5.005_xx and older:
open FILE, ">", "whatever";
$status = $csv->print (\*FILE, $colref);
-The glob C<\*FILE> is not an object, thus it doesn't have a print
-method. The solution is to use an IO::File object or to hide the
-glob behind an IO::Wrap object. See L<IO::File(3)> and L<IO::Wrap(3)>
-for details.
+as in perl 5.005 and older, the glob C<\*FILE> is not an object, thus it
+doesn't have a print method. The solution is to use an IO::File object or
+to hide the glob behind an IO::Wrap object. See L<IO::File(3)> and
+L<IO::Wrap(3)> for details.
For performance reasons the print method doesn't create a result string.
In particular the I<$csv-E<gt>string ()>, I<$csv-E<gt>status ()>,
Modified: branches/upstream/libtext-csv-xs-perl/current/CSV_XS.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/CSV_XS.xs?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/CSV_XS.xs (original)
+++ branches/upstream/libtext-csv-xs-perl/current/CSV_XS.xs Sun Mar 8 22:45:36 2009
@@ -249,7 +249,6 @@
if ((svp = hv_fetchs (self, "eol", FALSE)) && *svp && SvOK (*svp)) {
csv->eol = SvPV (*svp, len);
csv->eol_len = len;
- csv->eol_is_cr = 0;
}
}
csv->is_bound =
@@ -306,6 +305,11 @@
if ((svp = hv_fetchs (self, "_types", FALSE)) && *svp && SvOK (*svp)) {
csv->types = SvPV (*svp, len);
csv->types_len = len;
+ }
+
+ csv->is_bound = 0;
+ if ((svp = hv_fetchs (self, "_is_bound", FALSE)) && *svp && SvOK(*svp)) {
+ csv->is_bound = SvIV(*svp);
}
csv->binary = bool_opt ("binary");
@@ -1161,7 +1165,7 @@
SetupCsv (&csv, hv);
csv.useIO = useIO;
#if (PERL_BCDVERSION >= 0x5008000)
- if (*csv.eol)
+ if (csv.eol && *csv.eol)
PL_ors_sv = &PL_sv_undef;
#endif
result = Combine (&csv, io, av);
Modified: branches/upstream/libtext-csv-xs-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/ChangeLog?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/ChangeLog (original)
+++ branches/upstream/libtext-csv-xs-perl/current/ChangeLog Sun Mar 8 22:45:36 2009
@@ -1,3 +1,9 @@
+2009-03-08 0.61 - H.Merijn Brand <h.m.brand at xs4all.nl>
+
+ * valgrind found a possible uninitialized value
+ * Restriction in print () was only for really old perls
+ * Fix for bind_columns () initialisation (vincent, RT#43927)
+
2009-01-27 0.60 - H.Merijn Brand <h.m.brand at xs4all.nl>
* Optimize for threaded perls. (Goro Fuji, RT#42517)
Modified: branches/upstream/libtext-csv-xs-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/META.yml?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/META.yml (original)
+++ branches/upstream/libtext-csv-xs-perl/current/META.yml Sun Mar 8 22:45:36 2009
@@ -1,6 +1,6 @@
--- #YAML:1.1
name: Text-CSV_XS
-version: 0.60
+version: 0.61
abstract: Comma-Separated Values manipulation routines
license: perl
author:
@@ -10,7 +10,7 @@
provides:
Text::CSV_XS:
file: CSV_XS.pm
- version: 0.60
+ version: 0.61
requires:
perl: 5.005
DynaLoader: 0
Modified: branches/upstream/libtext-csv-xs-perl/current/ppport.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/ppport.h?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/ppport.h (original)
+++ branches/upstream/libtext-csv-xs-perl/current/ppport.h Sun Mar 8 22:45:36 2009
@@ -6,7 +6,7 @@
ppport.h -- Perl/Pollution/Portability Version 3.16
- Automatically created by Devel::PPPort running under perl 5.011000.
+ Automatically created by Devel::PPPort running under perl 5.010000.
Do NOT edit this file directly! -- Edit PPPort_pm.PL and the
includes in parts/inc/ instead.
Modified: branches/upstream/libtext-csv-xs-perl/current/t/70_rt.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-csv-xs-perl/current/t/70_rt.t?rev=31739&op=diff
==============================================================================
--- branches/upstream/libtext-csv-xs-perl/current/t/70_rt.t (original)
+++ branches/upstream/libtext-csv-xs-perl/current/t/70_rt.t Sun Mar 8 22:45:36 2009
@@ -4,7 +4,7 @@
$^W = 1;
#use Test::More "no_plan";
- use Test::More tests => 86;
+ use Test::More tests => 91;
BEGIN {
use_ok "Text::CSV_XS", ();
@@ -180,6 +180,26 @@
is_deeply ($row, [qw( DOG CAT WOMBAT BANDERSNATCH )], "fields ()");
ok ($csv->parse ($input{$rt}[1]), "parse () with decoded sep/quo");
is_deeply ([ $csv->fields ], [ 0..3 ], "fields ()");
+ }
+ }
+
+{ # http://rt.cpan.org/Ticket/Display.html?id=43927
+ # 43927: Is bind_columns broken or am I using it wrong?
+ $rt = 43927;
+ SKIP: {
+ open FH, ">$csv_file";
+ print FH @{$input{$rt}};
+ close FH;
+ my ($c1, $c2);
+ ok (my $csv = Text::CSV_XS->new ({ binary => 1 }), "RT-$rt: $desc{$rt}");
+ ok ($csv->bind_columns (\$c1, \$c2), "bind columns");
+ open FH, "<$csv_file";
+ ok (my $row = $csv->getline (*FH), "getline () with bound columns");
+ $csv->error_diag ();
+ close FH;
+ unlink $csv_file;
+ is_deeply ($row, [], "should return empty ref");
+ is_deeply ([ $c1, $c2], [ 1, 2 ], "fields ()");
}
}
@@ -215,3 +235,5 @@
«42642» - failure on unusual quote/sep values
þDOGþþCATþþWOMBATþþBANDERSNATCHþ
þ0þþ1þþ2þþ3þ
+«43927» - Is bind_columns broken or am I using it wrong?
+1,2
More information about the Pkg-perl-cvs-commits
mailing list