r5438 - in /packages/libtext-csv-perl/trunk: ./ debian/ debian/patches/ t/
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Fri May 18 16:24:34 UTC 2007
Author: gregoa-guest
Date: Fri May 18 16:24:33 2007
New Revision: 5438
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5438
Log:
move patches from .diff.gz to dpatch
Added:
packages/libtext-csv-perl/trunk/debian/patches/
packages/libtext-csv-perl/trunk/debian/patches/00list
packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch (with props)
packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch (with props)
packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch (with props)
Removed:
packages/libtext-csv-perl/trunk/CSV.pm
Modified:
packages/libtext-csv-perl/trunk/CSV_XS.pm
packages/libtext-csv-perl/trunk/debian/control
packages/libtext-csv-perl/trunk/debian/rules
packages/libtext-csv-perl/trunk/t/base.t
packages/libtext-csv-perl/trunk/t/file.t
packages/libtext-csv-perl/trunk/t/misc.t
packages/libtext-csv-perl/trunk/t/samples.t
packages/libtext-csv-perl/trunk/t/types.t
Modified: packages/libtext-csv-perl/trunk/CSV_XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/CSV_XS.pm?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/CSV_XS.pm (original)
+++ packages/libtext-csv-perl/trunk/CSV_XS.pm Fri May 18 16:24:33 2007
@@ -440,9 +440,6 @@
You may use the I<types()> method for setting column types. See the
description below.
-Please note that if you expect your file to contain non-base-ASCII characters
-(this means, any accented or UTF8 character), you should set the C<binary>
-attribute to C<true>, otherwise the line will not be parsed.
=item getline
Modified: packages/libtext-csv-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/control?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/control (original)
+++ packages/libtext-csv-perl/trunk/debian/control Fri May 18 16:24:33 2007
@@ -1,11 +1,11 @@
Source: libtext-csv-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Gunnar Wolf <gwolf at debian.org>, Niko Tyni <ntyni at iki.fi>
+Uploaders: Gunnar Wolf <gwolf at debian.org>, Niko Tyni <ntyni at iki.fi>, gregor herrmann <gregor+debian at comodo.priv.at>
Section: perl
Priority: optional
Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.debian.org/pkg-perl/packages/libtext-csv-perl/trunk/
-Build-Depends: debhelper (>= 5), perl (>> 5.8.1)
+Build-Depends: debhelper (>= 5), perl (>> 5.8.1), dpatch
Package: libtext-csv-perl
Architecture: any
Added: packages/libtext-csv-perl/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/patches/00list?rev=5438&op=file
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/patches/00list (added)
+++ packages/libtext-csv-perl/trunk/debian/patches/00list Fri May 18 16:24:33 2007
@@ -1,0 +1,3 @@
+01_cvs.pm
+02_tests
+03_csv_xs.pm
Added: packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch?rev=5438&op=file
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch (added)
+++ packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch Fri May 18 16:24:33 2007
@@ -1,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_no_xs.dpatch by <gregor+debian at comodo.priv.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: create CSV.pm
+
+ at DPATCH@
+
+--- libtext-csv-perl-0.23.orig/CSV.pm
++++ libtext-csv-perl-0.23/CSV.pm
+@@ -0,0 +1,14 @@
++
++package Text::CSV;
++
++use vars (@ISA);
++
++ at ISA = qw(Text::CSV_XS);
++
++use Text::CSV_XS;
++
++sub PV () { 0 }
++sub IV () { 1 }
++sub NV () { 2 }
++
++1;
Propchange: packages/libtext-csv-perl/trunk/debian/patches/01_cvs.pm.dpatch
------------------------------------------------------------------------------
svn:executable = *
Added: packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch?rev=5438&op=file
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch (added)
+++ packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch Fri May 18 16:24:33 2007
@@ -1,0 +1,154 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_no_xs.dpatch by <gregor+debian at comodo.priv.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: patch tests
+
+ at DPATCH@
+
+--- libtext-csv-perl-0.23.orig/t/base.t
++++ libtext-csv-perl-0.23/t/base.t
+@@ -7,7 +7,7 @@
+
+ BEGIN { $| = 1; print "1..28\n"; }
+ END {print "not ok 1\n" unless $loaded;}
+-use Text::CSV_XS;
++use Text::CSV;
+ $loaded = 1;
+ print "ok 1\n";
+
+@@ -25,7 +25,7 @@
+ # empty subclass test
+ #
+ package Empty_Subclass;
+- at Empty_Subclass::ISA = qw(Text::CSV_XS);
++ at Empty_Subclass::ISA = qw(Text::CSV);
+ package main;
+
+ #
+@@ -36,15 +36,15 @@
+ Test(ref($empty) eq 'Empty_Subclass')
+ or printf("Expected subclass %s, got %s\n",
+ 'Empty_Subclass', ref($empty));
+-Test($empty->version() == Text::CSV_XS->version())
++Test($empty->version() == Text::CSV->version())
+ or printf("Expected version %s, got %s\n",
+- &Text::CSV_XS->version(), $empty->version());
++ &Text::CSV->version(), $empty->version());
+ Test($empty->parse(''))
+ or print("Subclass parse() failed.\n");
+ Test($empty->combine(''))
+ or printf("Subclass combine() failed.\n");
+
+-my $csv = Text::CSV_XS->new();
++my $csv = Text::CSV->new();
+
+ #
+ # Important: Do not modify these tests unless you have a good
+--- libtext-csv-perl-0.23.orig/t/file.t
++++ libtext-csv-perl-0.23/t/file.t
+@@ -8,7 +8,7 @@
+ $| = 1;
+ print "1..72\n";
+
+-require Text::CSV_XS;
++require Text::CSV;
+
+
+ ############################################################################
+@@ -134,7 +134,7 @@
+ }
+
+
+-my($csv) = Text::CSV_XS->new();
++my($csv) = Text::CSV->new();
+
+ my($fh) = IO_Scalar->new();
+ Test(!$csv->print($fh, ["abc", "def\007", "ghi"]))
+--- libtext-csv-perl-0.23.orig/t/misc.t
++++ libtext-csv-perl-0.23/t/misc.t
+@@ -3,7 +3,7 @@
+ require 5.004;
+ use strict;
+
+-require Text::CSV_XS;
++require Text::CSV;
+
+
+ my($testNum) = 0;
+@@ -19,7 +19,7 @@
+
+ my(@binFields) = ("abc\0def\n\rghi", "ab\"ce,\032\"'", "\377");
+
+-my($csv) = Text::CSV_XS->new({'binary' => 1});
++my($csv) = Text::CSV->new({'binary' => 1});
+ Test($csv->combine(@binFields)) or print "Failed to encode binary fields\n";
+ my($string) = $csv->string();
+ Test($string eq qq("abc"0def\n\rghi","ab""ce,\032""'",\377))
+@@ -58,7 +58,7 @@
+
+ # Ken's test
+ {
+- my $csv2 = Text::CSV_XS->new({'always_quote' => 1});
++ my $csv2 = Text::CSV->new({'always_quote' => 1});
+ Test($csv2->combine("abc","def","ghi"));
+ Test($csv2->string() eq qq("abc","def","ghi"))
+ or printf("Expected %s, got %s.\n", qq("abc","def","ghi"),
+--- libtext-csv-perl-0.23.orig/t/samples.t
++++ libtext-csv-perl-0.23/t/samples.t
+@@ -2,7 +2,7 @@
+
+ require 5.004;
+ use strict;
+-use Text::CSV_XS ();
++use Text::CSV ();
+
+ #
+ # Some assorted examples from the modules history
+@@ -28,7 +28,7 @@
+ # "Pavel Kotala" <pkotala at logis.cz>
+ #
+ {
+- my $csv = Text::CSV_XS->new({'quote_char' => '"',
++ my $csv = Text::CSV->new({'quote_char' => '"',
+ 'escape_char' => '\\',
+ 'sep_char' => ';',
+ 'binary' => 1});
+--- libtext-csv-perl-0.23.orig/t/types.t
++++ libtext-csv-perl-0.23/t/types.t
+@@ -3,7 +3,7 @@
+ require 5.004;
+ use strict;
+
+-use Text::CSV_XS ();
++use Text::CSV ();
+
+
+ {
+@@ -22,18 +22,18 @@
+
+ print "1..12\n";
+
+-my $csv = Text::CSV_XS->new({'types' => [Text::CSV_XS::IV(),
+- Text::CSV_XS::PV(),
+- Text::CSV_XS::NV()]});
++my $csv = Text::CSV->new({'types' => [Text::CSV::IV(),
++ Text::CSV::PV(),
++ Text::CSV::NV()]});
+ Test($csv);
+ Test(@{$csv->{'types'}} == 3);
+-Test($csv->{'types'}->[0] == Text::CSV_XS::IV() and
+- $csv->{'types'}->[1] == Text::CSV_XS::PV() and
+- $csv->{'types'}->[2] == Text::CSV_XS::NV());
++Test($csv->{'types'}->[0] == Text::CSV::IV() and
++ $csv->{'types'}->[1] == Text::CSV::PV() and
++ $csv->{'types'}->[2] == Text::CSV::NV());
+ Test(length($csv->{'_types'}) == 3);
+ Test($csv->{'_types'} eq
+- chr(Text::CSV_XS::IV()) . chr(Text::CSV_XS::PV()) .
+- chr(Text::CSV_XS::NV()));
++ chr(Text::CSV::IV()) . chr(Text::CSV::PV()) .
++ chr(Text::CSV::NV()));
+
+ Test($csv->combine('', '', '1.00'));
+ Test($csv->string() eq ",,1.00");
Propchange: packages/libtext-csv-perl/trunk/debian/patches/02_tests.dpatch
------------------------------------------------------------------------------
svn:executable = *
Added: packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch?rev=5438&op=file
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch (added)
+++ packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch Fri May 18 16:24:33 2007
@@ -1,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_no_xs.dpatch by <gregor+debian at comodo.priv.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: note about "binary" in CSV_XS.pm
+
+ at DPATCH@
+
+--- libtext-csv-perl-0.23.orig/CSV_XS.pm
++++ libtext-csv-perl-0.23/CSV_XS.pm
+@@ -440,6 +440,9 @@
+ You may use the I<types()> method for setting column types. See the
+ description below.
+
++Please note that if you expect your file to contain non-base-ASCII characters
++(this means, any accented or UTF8 character), you should set the C<binary>
++attribute to C<true>, otherwise the line will not be parsed.
+
+ =item getline
+
Propchange: packages/libtext-csv-perl/trunk/debian/patches/03_csv_xs.pm.dpatch
------------------------------------------------------------------------------
svn:executable = *
Modified: packages/libtext-csv-perl/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/debian/rules?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/debian/rules (original)
+++ packages/libtext-csv-perl/trunk/debian/rules Fri May 18 16:24:33 2007
@@ -1,6 +1,8 @@
#! /usr/bin/make -f
# -*-makefile-*-
# debian/rules file for libtext-csv-perl
+
+include /usr/share/dpatch/dpatch.make
PERL ?= /usr/bin/perl
@@ -11,13 +13,13 @@
sed -ne 's/^Version: *\([0-9]\+:\)*//p')
build: build-stamp
-build-stamp:
+build-stamp: patch
dh_testdir
$(PERL) Makefile.PL INSTALLDIRS=vendor PERL=$(PERL)
$(MAKE) LD_RUN_PATH=
touch $@
-clean: checkroot
+clean: checkroot unpatch
rm -f build-stamp
dh_clean
[ ! -f Makefile ] || $(MAKE) distclean
Modified: packages/libtext-csv-perl/trunk/t/base.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/t/base.t?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/t/base.t (original)
+++ packages/libtext-csv-perl/trunk/t/base.t Fri May 18 16:24:33 2007
@@ -7,7 +7,7 @@
BEGIN { $| = 1; print "1..28\n"; }
END {print "not ok 1\n" unless $loaded;}
-use Text::CSV;
+use Text::CSV_XS;
$loaded = 1;
print "ok 1\n";
@@ -25,7 +25,7 @@
# empty subclass test
#
package Empty_Subclass;
- at Empty_Subclass::ISA = qw(Text::CSV);
+ at Empty_Subclass::ISA = qw(Text::CSV_XS);
package main;
#
@@ -36,15 +36,15 @@
Test(ref($empty) eq 'Empty_Subclass')
or printf("Expected subclass %s, got %s\n",
'Empty_Subclass', ref($empty));
-Test($empty->version() == Text::CSV->version())
+Test($empty->version() == Text::CSV_XS->version())
or printf("Expected version %s, got %s\n",
- &Text::CSV->version(), $empty->version());
+ &Text::CSV_XS->version(), $empty->version());
Test($empty->parse(''))
or print("Subclass parse() failed.\n");
Test($empty->combine(''))
or printf("Subclass combine() failed.\n");
-my $csv = Text::CSV->new();
+my $csv = Text::CSV_XS->new();
#
# Important: Do not modify these tests unless you have a good
Modified: packages/libtext-csv-perl/trunk/t/file.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/t/file.t?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/t/file.t (original)
+++ packages/libtext-csv-perl/trunk/t/file.t Fri May 18 16:24:33 2007
@@ -8,7 +8,7 @@
$| = 1;
print "1..72\n";
-require Text::CSV;
+require Text::CSV_XS;
############################################################################
@@ -134,7 +134,7 @@
}
-my($csv) = Text::CSV->new();
+my($csv) = Text::CSV_XS->new();
my($fh) = IO_Scalar->new();
Test(!$csv->print($fh, ["abc", "def\007", "ghi"]))
Modified: packages/libtext-csv-perl/trunk/t/misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/t/misc.t?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/t/misc.t (original)
+++ packages/libtext-csv-perl/trunk/t/misc.t Fri May 18 16:24:33 2007
@@ -3,7 +3,7 @@
require 5.004;
use strict;
-require Text::CSV;
+require Text::CSV_XS;
my($testNum) = 0;
@@ -19,7 +19,7 @@
my(@binFields) = ("abc\0def\n\rghi", "ab\"ce,\032\"'", "\377");
-my($csv) = Text::CSV->new({'binary' => 1});
+my($csv) = Text::CSV_XS->new({'binary' => 1});
Test($csv->combine(@binFields)) or print "Failed to encode binary fields\n";
my($string) = $csv->string();
Test($string eq qq("abc"0def\n\rghi","ab""ce,\032""'",\377))
@@ -58,7 +58,7 @@
# Ken's test
{
- my $csv2 = Text::CSV->new({'always_quote' => 1});
+ my $csv2 = Text::CSV_XS->new({'always_quote' => 1});
Test($csv2->combine("abc","def","ghi"));
Test($csv2->string() eq qq("abc","def","ghi"))
or printf("Expected %s, got %s.\n", qq("abc","def","ghi"),
Modified: packages/libtext-csv-perl/trunk/t/samples.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/t/samples.t?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/t/samples.t (original)
+++ packages/libtext-csv-perl/trunk/t/samples.t Fri May 18 16:24:33 2007
@@ -2,7 +2,7 @@
require 5.004;
use strict;
-use Text::CSV ();
+use Text::CSV_XS ();
#
# Some assorted examples from the modules history
@@ -28,7 +28,7 @@
# "Pavel Kotala" <pkotala at logis.cz>
#
{
- my $csv = Text::CSV->new({'quote_char' => '"',
+ my $csv = Text::CSV_XS->new({'quote_char' => '"',
'escape_char' => '\\',
'sep_char' => ';',
'binary' => 1});
Modified: packages/libtext-csv-perl/trunk/t/types.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-csv-perl/trunk/t/types.t?rev=5438&op=diff
==============================================================================
--- packages/libtext-csv-perl/trunk/t/types.t (original)
+++ packages/libtext-csv-perl/trunk/t/types.t Fri May 18 16:24:33 2007
@@ -3,7 +3,7 @@
require 5.004;
use strict;
-use Text::CSV ();
+use Text::CSV_XS ();
{
@@ -22,18 +22,18 @@
print "1..12\n";
-my $csv = Text::CSV->new({'types' => [Text::CSV::IV(),
- Text::CSV::PV(),
- Text::CSV::NV()]});
+my $csv = Text::CSV_XS->new({'types' => [Text::CSV_XS::IV(),
+ Text::CSV_XS::PV(),
+ Text::CSV_XS::NV()]});
Test($csv);
Test(@{$csv->{'types'}} == 3);
-Test($csv->{'types'}->[0] == Text::CSV::IV() and
- $csv->{'types'}->[1] == Text::CSV::PV() and
- $csv->{'types'}->[2] == Text::CSV::NV());
+Test($csv->{'types'}->[0] == Text::CSV_XS::IV() and
+ $csv->{'types'}->[1] == Text::CSV_XS::PV() and
+ $csv->{'types'}->[2] == Text::CSV_XS::NV());
Test(length($csv->{'_types'}) == 3);
Test($csv->{'_types'} eq
- chr(Text::CSV::IV()) . chr(Text::CSV::PV()) .
- chr(Text::CSV::NV()));
+ chr(Text::CSV_XS::IV()) . chr(Text::CSV_XS::PV()) .
+ chr(Text::CSV_XS::NV()));
Test($csv->combine('', '', '1.00'));
Test($csv->string() eq ",,1.00");
More information about the Pkg-perl-cvs-commits
mailing list