r63412 - in /trunk/libdbd-csv-perl: ./ debian/ lib/Bundle/DBD/ lib/DBD/ t/
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Tue Oct 5 23:05:41 UTC 2010
Author: periapt-guest
Date: Tue Oct 5 23:05:28 2010
New Revision: 63412
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63412
Log:
* New upstream release
* Upped standards version to 3,9.1
* Refreshed copyright
Added:
trunk/libdbd-csv-perl/t/31_delete.t
- copied unchanged from r63411, branches/upstream/libdbd-csv-perl/current/t/31_delete.t
Modified:
trunk/libdbd-csv-perl/ChangeLog
trunk/libdbd-csv-perl/MANIFEST
trunk/libdbd-csv-perl/META.yml
trunk/libdbd-csv-perl/Makefile.PL
trunk/libdbd-csv-perl/debian/changelog
trunk/libdbd-csv-perl/debian/control
trunk/libdbd-csv-perl/debian/copyright
trunk/libdbd-csv-perl/lib/Bundle/DBD/CSV.pm
trunk/libdbd-csv-perl/lib/DBD/CSV.pm
trunk/libdbd-csv-perl/t/00_meta.t
trunk/libdbd-csv-perl/t/00_pod.t
trunk/libdbd-csv-perl/t/00_pod_cov.t
trunk/libdbd-csv-perl/t/10_base.t
trunk/libdbd-csv-perl/t/11_dsnlist.t
trunk/libdbd-csv-perl/t/20_createdrop.t
trunk/libdbd-csv-perl/t/30_insertfetch.t
trunk/libdbd-csv-perl/t/40_numrows.t
trunk/libdbd-csv-perl/t/41_nulls.t
trunk/libdbd-csv-perl/t/42_bindparam.t
trunk/libdbd-csv-perl/t/43_blobs.t
trunk/libdbd-csv-perl/t/44_listfields.t
trunk/libdbd-csv-perl/t/48_utf8.t
trunk/libdbd-csv-perl/t/50_chopblanks.t
trunk/libdbd-csv-perl/t/51_commit.t
trunk/libdbd-csv-perl/t/60_misc.t
trunk/libdbd-csv-perl/t/70_csv.t
trunk/libdbd-csv-perl/t/71_csv-ext.t
trunk/libdbd-csv-perl/t/72_csv-schema.t
trunk/libdbd-csv-perl/t/73_csv-case.t
trunk/libdbd-csv-perl/t/80_rt.t
Modified: trunk/libdbd-csv-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/ChangeLog?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/ChangeLog (original)
+++ trunk/libdbd-csv-perl/ChangeLog Tue Oct 5 23:05:28 2010
@@ -1,4 +1,12 @@
-2010-07-06 0.30 H.Merijn Brand
+2010-09-18 0.31 H.Merijn Brand
+
+ * Require 5.8.1 (effectively already doing so by requiring DBI-1.614)
+ * Update tests to use warnings and done_testing ()
+ requires Test::More-0.90, which is also required for DBI
+ * Better diagnostics for empty files
+ * Allow late setting of attributes (RT#61168) - requires DBI-1.614
+
+2010-07-09 0.30 H.Merijn Brand
* Text::CSV_XS now called with auto_diag
* Implement valid_attrs
Modified: trunk/libdbd-csv-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/MANIFEST?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/MANIFEST (original)
+++ trunk/libdbd-csv-perl/MANIFEST Tue Oct 5 23:05:28 2010
@@ -12,6 +12,7 @@
t/11_dsnlist.t
t/20_createdrop.t
t/30_insertfetch.t
+t/31_delete.t
t/40_numrows.t
t/41_nulls.t
t/42_bindparam.t
Modified: trunk/libdbd-csv-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/META.yml?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/META.yml (original)
+++ trunk/libdbd-csv-perl/META.yml Tue Oct 5 23:05:28 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: DBD::CSV
-version: 0.30
+version: 0.31
abstract: DBI driver for CSV files
license: perl
author:
@@ -13,12 +13,12 @@
provides:
DBD::CSV:
file: lib/DBD/CSV.pm
- version: 0.30
+ version: 0.31
requires:
perl: 5.008001
- DBI: 1.611
- DBD::File: 0.38
- SQL::Statement: 1.25
+ DBI: 1.614
+ DBD::File: 0.40
+ SQL::Statement: 1.31
Text::CSV_XS: 0.71
configure_requires:
ExtUtils::MakeMaker: 0
@@ -26,14 +26,14 @@
perl: 5.008001
Config: 0
Test::Harness: 0
- Test::More: 0
+ Test::More: 0.90
Encode: 0
Cwd: 0
charnames: 0
recommends:
perl: 5.012001
Text::CSV_XS: 0.73
- SQL::Statement: 1.27
+ Test::More: 0.96
installdirs: site
resources:
license: http://dev.perl.org/licenses/
Modified: trunk/libdbd-csv-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/Makefile.PL?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/Makefile.PL (original)
+++ trunk/libdbd-csv-perl/Makefile.PL Tue Oct 5 23:05:28 2010
@@ -2,7 +2,7 @@
# Copyright (c) 2009-2010 H.Merijn Brand
-require 5.005003;
+require 5.008001;
use strict;
@@ -32,11 +32,11 @@
AUTHOR => "H.Merijn Brand <h.merijn\@xs4all.nl>",
VERSION_FROM => "lib/DBD/CSV.pm",
PREREQ_PM => {
- "DBI" => 1.611,
+ "DBI" => 1.613,
"Text::CSV_XS" => 0.71,
- "SQL::Statement" => 1.25,
+ "SQL::Statement" => 1.30,
"DBD::File" => 0.38,
- "Test::More" => 0,
+ "Test::More" => 0.90,
"Encode" => 0,
"charnames" => 0,
},
@@ -68,7 +68,10 @@
'cover test_cover:',
' cover -test',
'',
- 'checkmeta:',
+ 'spellcheck:',
+ ' pod-spell-check --aspell',
+ '',
+ 'checkmeta: spellcheck',
' perl sandbox/genMETA.pl -c',
'',
'fixmeta: distmeta',
Modified: trunk/libdbd-csv-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/debian/changelog?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/debian/changelog (original)
+++ trunk/libdbd-csv-perl/debian/changelog Tue Oct 5 23:05:28 2010
@@ -1,8 +1,11 @@
-libdbd-csv-perl (0.3000-2) UNRELEASED; urgency=low
+libdbd-csv-perl (0.3100-1) UNRELEASED; urgency=low
* Added myself to Uploaders
-
- -- Nicholas Bamber <nicholas at periapt.co.uk> Tue, 05 Oct 2010 23:51:43 +0100
+ * New upstream release
+ * Upped standards version to 3,9.1
+ * Refreshed copyright
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk> Tue, 05 Oct 2010 23:55:52 +0100
libdbd-csv-perl (0.3000-1) unstable; urgency=low
Modified: trunk/libdbd-csv-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/debian/control?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/debian/control (original)
+++ trunk/libdbd-csv-perl/debian/control Tue Oct 5 23:05:28 2010
@@ -9,7 +9,7 @@
Uploaders: Gunnar Wolf <gwolf at debian.org>, gregor herrmann <gregoa at debian.org>,
Jonathan Yu <jawnsy at cpan.org>, Ansgar Burchardt <ansgar at 43-1.org>,
Nicholas Bamber <nicholas at periapt.co.uk>
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
Homepage: http://search.cpan.org/dist/DBD-CSV/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdbd-csv-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdbd-csv-perl/
Modified: trunk/libdbd-csv-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/debian/copyright?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/debian/copyright (original)
+++ trunk/libdbd-csv-perl/debian/copyright Tue Oct 5 23:05:28 2010
@@ -18,14 +18,16 @@
2001-2002, Stephen Zander <gibreel at debian.org>
1999, Piotr Roszatycki <dexter at debian.org>
1998, Craig Sanders <cas at taz.net.au>
+ 2010, Ansgar Burchardt <ansgar at 43-1.org>
+ 2010, Nicholas Bamber <nicholas at periapt.co.uk>
License: Artistic or GPL-1+
License: Artistic
This program is free software; you can redistribute it and/or modify
it under the terms of the Artistic License, which comes with Perl.
.
- On Debian GNU/Linux systems, the complete text of the Artistic License
- can be found in `/usr/share/common-licenses/Artistic'
+ On Debian systems, the complete text of the Artistic License
+ can be found in `/usr/share/common-licenses/Artistic'.
License: GPL-1+
This program is free software; you can redistribute it and/or modify
@@ -33,5 +35,5 @@
the Free Software Foundation; either version 1, or (at your option)
any later version.
.
- On Debian GNU/Linux systems, the complete text of the GNU General
- Public License can be found in `/usr/share/common-licenses/GPL'
+ On Debian systems, the complete text of version 1 of the
+ General Public License can be found in `/usr/share/common-licenses/GPL-1'.
Modified: trunk/libdbd-csv-perl/lib/Bundle/DBD/CSV.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/lib/Bundle/DBD/CSV.pm?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/lib/Bundle/DBD/CSV.pm (original)
+++ trunk/libdbd-csv-perl/lib/Bundle/DBD/CSV.pm Tue Oct 5 23:05:28 2010
@@ -18,15 +18,15 @@
=head1 CONTENTS
-DBI 1.612
+DBI 1.614
Text::CSV_XS 0.73
-SQL::Statement 1.28
+SQL::Statement 1.31
-DBD::File 0.39
+DBD::File 0.40
-DBD::CSV 0.30
+DBD::CSV 0.31
=head1 DESCRIPTION
Modified: trunk/libdbd-csv-perl/lib/DBD/CSV.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/lib/DBD/CSV.pm?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/lib/DBD/CSV.pm (original)
+++ trunk/libdbd-csv-perl/lib/DBD/CSV.pm Tue Oct 5 23:05:28 2010
@@ -34,7 +34,7 @@
@ISA = qw( DBD::File );
-$VERSION = "0.30";
+$VERSION = "0.31";
$err = 0; # holds error code for DBI::err
$errstr = ""; # holds error string for DBI::errstr
@@ -130,6 +130,8 @@
}; # csv_versions
}
+my %csv_xs_attr;
+
sub init_valid_attributes
{
my $dbh = shift;
@@ -139,6 +141,7 @@
always_quote auto_diag binary blank_is_undef empty_is_undef
eol escape_char keep_meta_info quote_char quote_null
quote_space sep_char types verbatim );
+ @csv_xs_attr{@xs_attr} = ();
$dbh->{csv_xs_valid_attrs} = [ @xs_attr ];
@@ -371,27 +374,25 @@
}
} # init_table_meta
-my %compat_map = (
- file => "f_file",
- class => "csv_class",
- eof => "csv_eof",
- );
-
-sub get_table_meta_attr
+my %compat_map = map { $_ => "csv_$_" }
+ qw( class eof eol quote_char sep_char escape_char );
+
+__PACKAGE__->register_compat_map (\%compat_map);
+
+sub table_meta_attr_changed
{
- my ($class, $meta, $attrib) = @_;
- defined $compat_map{$attrib} and
- return $class->SUPER::get_table_meta_attr ($meta, $compat_map{$attrib});
- return $class->SUPER::get_table_meta_attr ($meta, $attrib);
- } # get_table_meta_attr
-
-sub set_table_meta_attr
-{
- my ($class, $meta, $attrib, $value) = @_;
- defined $compat_map{$attrib} and
- return $class->SUPER::set_table_meta_attr ($meta, $compat_map{$attrib}, $value);
- return $class->SUPER::set_table_meta_attr ($meta, $attrib, $value);
- } # set_table_meta_attr
+ my ($class, $meta, $attr, $value) = @_;
+
+ (my $csv_attr = $attr) =~ s/^csv_//;
+ if (exists $csv_xs_attr{$csv_attr}) {
+ for ("csv_in", "csv_out") {
+ exists $meta->{$_} && exists $meta->{$_}{$csv_attr} and
+ $meta->{$_}{$csv_attr} = $value;
+ }
+ }
+
+ $class->SUPER::table_meta_attr_changed ($meta, $attr, $value);
+ } # table_meta_attr_changed
$DBD::File::VERSION > 0.38 and *open_file = sub {
my ($self, $meta, $attrs, $flags) = @_;
@@ -425,7 +426,7 @@
$meta->{skip_rows} = $skipRows;
if ($skipRows--) {
$array = $attrs->{csv_csv_in}->getline ($tbl->{fh}) or
- croak "Missing first row";
+ croak "Missing first row due to ".$attrs->{csv_csv_in}->error_diag;
unless ($meta->{raw_header}) {
s/\W/_/g for @$array;
}
@@ -544,7 +545,7 @@
function. Thus the module should run (in theory) on any system with
a working C<flock ()>, in particular on all Unix machines and on Windows
NT. Under Windows 95 and MacOS the use of C<flock ()> is disabled, thus
-the module should still be usable,
+the module should still be usable.
Unlike other DBI drivers, you don't need an external SQL engine or a
running server. All you need are the following Perl modules, available
Modified: trunk/libdbd-csv-perl/t/00_meta.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/00_meta.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/00_meta.t (original)
+++ trunk/libdbd-csv-perl/t/00_meta.t Tue Oct 5 23:05:28 2010
@@ -1,8 +1,9 @@
#!/usr/bin/perl
# Test that our META.yml file matches the specification
+
use strict;
-$^W = 1;
+use warnings;
my @MODULES = ( "Test::CPAN::Meta 0.12" );
Modified: trunk/libdbd-csv-perl/t/00_pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/00_pod.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/00_pod.t (original)
+++ trunk/libdbd-csv-perl/t/00_pod.t Tue Oct 5 23:05:28 2010
@@ -1,8 +1,9 @@
#!/usr/bin/perl
# Test that the documentation syntax is correct
+
use strict;
-$^W = 1;
+use warnings;
use Test::More;
Modified: trunk/libdbd-csv-perl/t/00_pod_cov.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/00_pod_cov.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/00_pod_cov.t (original)
+++ trunk/libdbd-csv-perl/t/00_pod_cov.t Tue Oct 5 23:05:28 2010
@@ -1,8 +1,9 @@
#!/usr/bin/perl
# Test that all methods are documented
+
use strict;
-$^W = 1;
+use warnings;
use Test::More;
Modified: trunk/libdbd-csv-perl/t/10_base.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/10_base.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/10_base.t (original)
+++ trunk/libdbd-csv-perl/t/10_base.t Tue Oct 5 23:05:28 2010
@@ -1,9 +1,10 @@
#!/usr/bin/perl
-#
+
# Test whether the driver can be installed
use strict;
-use Test::More tests => 9;
+use warnings;
+use Test::More;
BEGIN {
use_ok ("DBI");
@@ -34,3 +35,5 @@
my $csv_version_info = $dbh->csv_versions ();
ok ($csv_version_info, "csv_versions");
diag ($csv_version_info);
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/11_dsnlist.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/11_dsnlist.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/11_dsnlist.t (original)
+++ trunk/libdbd-csv-perl/t/11_dsnlist.t Tue Oct 5 23:05:28 2010
@@ -1,9 +1,10 @@
#!/usr/bin/perl
-#
+
# Test whether data_sources () returns something useful
use strict;
-use Test::More tests => 15;
+use warnings;
+use Test::More;
# Include lib.pl
BEGIN { use_ok ("DBI") }
@@ -27,3 +28,5 @@
ok (my $dns = Connect ("dbi:CSV:f_dir=$d"), "use $d as f_dir");
ok ($dbh->disconnect, "disconnect");
}
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/20_createdrop.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/20_createdrop.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/20_createdrop.t (original)
+++ trunk/libdbd-csv-perl/t/20_createdrop.t Tue Oct 5 23:05:28 2010
@@ -1,8 +1,10 @@
#!/usr/bin/perl
# Test if a table can be created and dropped
+
use strict;
-use Test::More tests => 9;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -26,3 +28,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
ok (!-f $tbl_file, "file removed");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/30_insertfetch.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/30_insertfetch.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/30_insertfetch.t (original)
+++ trunk/libdbd-csv-perl/t/30_insertfetch.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/local/bin/perl
+# Test row insertion and retrieval
+
use strict;
-use Test::More tests => 33;
-
-# Test row insertion and retrieval
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -82,3 +82,5 @@
ok ($dbh->do ("drop table $tbl"), "drop");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/40_numrows.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/40_numrows.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/40_numrows.t (original)
+++ trunk/libdbd-csv-perl/t/40_numrows.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# This tests, whether the number of rows can be retrieved.
+
use strict;
-use Test::More tests => 25;
-
-# This tests, whether the number of rows can be retrieved.
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
require "t/lib.pl";
@@ -70,3 +70,5 @@
ok ($dbh->do ("DROP TABLE $tbl"), "drop");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/41_nulls.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/41_nulls.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/41_nulls.t (original)
+++ trunk/libdbd-csv-perl/t/41_nulls.t Tue Oct 5 23:05:28 2010
@@ -1,8 +1,10 @@
#!/usr/bin/perl
# This is a test for correctly handling NULL values.
+
use strict;
-use Test::More tests => 29;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -59,3 +61,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/42_bindparam.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/42_bindparam.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/42_bindparam.t (original)
+++ trunk/libdbd-csv-perl/t/42_bindparam.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# Test if bindparam () works
+
use strict;
-use Test::More tests => 48;
-
-# Test if bindparam () works
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -94,3 +94,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/43_blobs.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/43_blobs.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/43_blobs.t (original)
+++ trunk/libdbd-csv-perl/t/43_blobs.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# This is a test for correct handling of BLOBS and $dbh->quote ()
+
use strict;
-use Test::More tests => 15;
-
-# This is a test for correct handling of BLOBS and $dbh->quote ()
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -39,3 +39,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/44_listfields.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/44_listfields.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/44_listfields.t (original)
+++ trunk/libdbd-csv-perl/t/44_listfields.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# This is a test for statement attributes being present appropriately.
+
use strict;
-use Test::More "no_plan";
-
-# This is a test for statement attributes being present appropriately.
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -48,3 +48,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/48_utf8.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/48_utf8.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/48_utf8.t (original)
+++ trunk/libdbd-csv-perl/t/48_utf8.t Tue Oct 5 23:05:28 2010
@@ -1,6 +1,7 @@
#!/usr/bin/perl
# This is a test for correctly handling UTF-8 content
+
use strict;
use warnings;
use charnames ":full";
@@ -9,7 +10,7 @@
use Text::CSV_XS;
use Encode qw( encode );
-use Test::More tests => 46;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -65,3 +66,5 @@
ok ($dbh->do ("drop table $tbl1"), "drop table");
ok ($dbh->do ("drop table $tbl2"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/50_chopblanks.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/50_chopblanks.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/50_chopblanks.t (original)
+++ trunk/libdbd-csv-perl/t/50_chopblanks.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# This driver should check if 'ChopBlanks' works.
+
use strict;
-use Test::More tests => 65;
-
-# This driver should check if 'ChopBlanks' works.
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -59,3 +59,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/51_commit.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/51_commit.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/51_commit.t (original)
+++ trunk/libdbd-csv-perl/t/51_commit.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# Check commit, rollback and "AutoCommit" attribute
+
use strict;
-use Test::More tests => 24;
-
-# Chack commit, rollback and "AutoCommit" attribute
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI") }
do "t/lib.pl";
@@ -71,3 +71,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/60_misc.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/60_misc.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/60_misc.t (original)
+++ trunk/libdbd-csv-perl/t/60_misc.t Tue Oct 5 23:05:28 2010
@@ -1,10 +1,10 @@
#!/usr/bin/perl
+# Misc tests
+
use strict;
-use Test::More tests => 40;
-
-# Misc tests
-$^W = 1;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI"); }
do "t/lib.pl";
@@ -65,3 +65,5 @@
ok ($dbh->do ("drop table $tbl"), "drop table");
ok ($dbh->disconnect, "disconnect");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/70_csv.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/70_csv.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/70_csv.t (original)
+++ trunk/libdbd-csv-perl/t/70_csv.t Tue Oct 5 23:05:28 2010
@@ -1,7 +1,8 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 73;
+use warnings;
+use Test::More;
use Cwd;
BEGIN { use_ok ("DBI"); }
@@ -130,3 +131,5 @@
ok ($dbh->disconnect, "disconnect");
undef $dbh;
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/71_csv-ext.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/71_csv-ext.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/71_csv-ext.t (original)
+++ trunk/libdbd-csv-perl/t/71_csv-ext.t Tue Oct 5 23:05:28 2010
@@ -1,7 +1,8 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 35;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI"); }
do "t/lib.pl";
@@ -77,3 +78,5 @@
undef $dbh;
ok (rmdir $dir, "no files left");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/72_csv-schema.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/72_csv-schema.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/72_csv-schema.t (original)
+++ trunk/libdbd-csv-perl/t/72_csv-schema.t Tue Oct 5 23:05:28 2010
@@ -1,7 +1,8 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 12;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI"); }
do "t/lib.pl";
@@ -47,3 +48,5 @@
undef $dbh;
ok (rmdir $dir, "no files left");
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/73_csv-case.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/73_csv-case.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/73_csv-case.t (original)
+++ trunk/libdbd-csv-perl/t/73_csv-case.t Tue Oct 5 23:05:28 2010
@@ -1,7 +1,8 @@
#!/usr/bin/perl
use strict;
-use Test::More "no_plan"; #tests => 66;
+use warnings;
+use Test::More;
BEGIN { use_ok ("DBI"); }
do "t/lib.pl";
@@ -58,3 +59,5 @@
ok ($dbh->disconnect, "disconnect");
undef $dbh;
+
+done_testing ();
Modified: trunk/libdbd-csv-perl/t/80_rt.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libdbd-csv-perl/t/80_rt.t?rev=63412&op=diff
==============================================================================
--- trunk/libdbd-csv-perl/t/80_rt.t (original)
+++ trunk/libdbd-csv-perl/t/80_rt.t Tue Oct 5 23:05:28 2010
@@ -1,9 +1,9 @@
#!/usr/bin/perl
use strict;
-$^W = 1;
-
-use Test::More "no_plan";
+use warnings;
+
+use Test::More;
use DBI qw(:sql_types);
do "t/lib.pl";
@@ -24,9 +24,9 @@
ok ($rt, "RT-$rt - $desc{$rt}");
my @lines = @{$input{$rt}};
- open FILE, ">output/rt$rt";
- print FILE @lines;
- close FILE;
+ open my $fh, ">", "output/rt$rt";
+ print $fh @lines;
+ close $fh;
ok (my $dbh = Connect (), "connect");
ok (my $sth = $dbh->prepare ("select * from rt$rt"), "prepare");
@@ -61,9 +61,9 @@
ok ($rt, "RT-$rt - $desc{$rt}");
my @lines = @{$input{$rt}};
- open FILE, ">output/rt$rt";
- print FILE @lines;
- close FILE;
+ open my $fh, ">", "output/rt$rt";
+ print $fh @lines;
+ close $fh;
ok (my $dbh = Connect (), "connect");
ok (my $sth = $dbh->prepare ("select * from rt$rt"), "prepare");
@@ -127,9 +127,9 @@
ok ($rt, "RT-$rt - $desc{$rt}");
my @lines = @{$input{$rt}};
- open FILE, ">output/rt$rt";
- print FILE @lines;
- close FILE;
+ open my $fh, ">", "output/rt$rt";
+ print $fh @lines;
+ close $fh;
ok (my $dbh = Connect (), "connect");
ok (my $sth = $dbh->prepare ("select * from rt$rt"), "prepare");
@@ -196,7 +196,7 @@
-f $rtfn or $rtfn = DbFile ("rt$rt.csv");
ok (-f $rtfn, "file $rtfn exists");
ok (-s $rtfn, "file is not empty");
- open my $fh, "< $rtfn";
+ open my $fh, "<", $rtfn;
ok ($fh, "open file");
binmode $fh;
is (scalar <$fh>, qq{name,id\r\n}, "Field names");
@@ -216,9 +216,9 @@
my @dbitp = ( SQL_INTEGER, SQL_LONGVARCHAR, SQL_NUMERIC );
my @csvtp = ( 1, 0, 2 );
- open FILE, ">output/rt$rt";
- print FILE @lines;
- close FILE;
+ open my $fh, ">", "output/rt$rt";
+ print $fh @lines;
+ close $fh;
ok (my $dbh = Connect ({ f_lock => 0 }), "connect");
$dbh->{csv_tables}{rt51090}{types} = [ @dbitp ];
@@ -231,6 +231,37 @@
ok ($dbh->do ("drop table RT$rt"), "drop");
ok ($dbh->disconnect, "disconnect");
}
+
+{ $rt = 61168;
+ ok ($rt, "RT-$rt - $desc{$rt}");
+ my @lines = @{$input{$rt}};
+
+ open my $fh, ">", "output/rt$rt";
+ print $fh @lines;
+ close $fh;
+
+ ok (my $dbh = Connect ({ f_lock => 0 }), "connect");
+ $dbh->{csv_tables}{rt61168}{sep_char} = ";";
+ cmp_ok ($dbh->{csv_tables}{rt61168}{csv_in} {sep_char}, "eq", ";", "cvs_in adjusted");
+ cmp_ok ($dbh->{csv_tables}{rt61168}{csv_out}{sep_char}, "eq", ";", "cvs_out adjusted");
+ ok (my $sth = $dbh->prepare ("select * from rt$rt"), "prepare");
+
+ ok ($sth->execute (), "execute");
+ ok (my $all_rows = $sth->fetchall_arrayref({}), "fetch");
+ my $wanted_rows = [
+ { header1 => "Volki",
+ header2 => "Bolki",
+ },
+ { header1 => "Zolki",
+ header2 => "Solki",
+ },
+ ];
+ is_deeply ($all_rows, $wanted_rows, "records");
+
+ ok ($dbh->do ("drop table RT$rt"), "drop");
+ ok ($dbh->disconnect, "disconnect");
+ }
+done_testing ();
__END__
«357» - build failure of DBD::CSV
@@ -264,3 +295,7 @@
«46627» - DBD::File is damaged now
«51090» - Report a bug in DBD-CSV
integer,longvarchar,numeric
+«61168» - Specifying seperation character per table does not work
+"HEADER1";"HEADER2"
+Volki;Bolki
+Zolki;Solki
More information about the Pkg-perl-cvs-commits
mailing list