diff -Nru libdbd-csv-perl-0.4500/ChangeLog libdbd-csv-perl-0.4800/ChangeLog --- libdbd-csv-perl-0.4500/ChangeLog 2014-10-23 07:23:33.000000000 +0000 +++ libdbd-csv-perl-0.4800/ChangeLog 2015-02-11 20:48:05.000000000 +0000 @@ -1,3 +1,14 @@ +0.48 - 2015-02-11, H.Merijn Brand + * Update list of valid Text::CSV_XS attributes + +0.47 - 2015-02-11, H.Merijn Brand + * Updated copyright to 2015 + * Make test-tablename unique for parallel testing + * Remove perl recommendation from META as it breaks cpan clients + +0.46 - 2014-11-08, H.Merijn Brand + * Column type CHAR should return 1 + 0.45 - 2014-10-23, H.Merijn Brand * Test unauthorized folder access (RT#99508). Requires DBD::File-0.43 * Fix DBI requirement phase (depend more on toolchain) (RT#99732) diff -Nru libdbd-csv-perl-0.4500/debian/changelog libdbd-csv-perl-0.4800/debian/changelog --- libdbd-csv-perl-0.4500/debian/changelog 2014-10-23 19:42:21.000000000 +0000 +++ libdbd-csv-perl-0.4800/debian/changelog 2015-05-09 21:16:24.000000000 +0000 @@ -1,3 +1,10 @@ +libdbd-csv-perl (0.4800-1) unstable; urgency=medium + + * Import upstream version 0.4800 + * Update years of upstream and packaging copyright. + + -- gregor herrmann Sat, 09 May 2015 23:16:18 +0200 + libdbd-csv-perl (0.4500-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libdbd-csv-perl-0.4500/debian/copyright libdbd-csv-perl-0.4800/debian/copyright --- libdbd-csv-perl-0.4500/debian/copyright 2014-10-23 19:42:21.000000000 +0000 +++ libdbd-csv-perl-0.4800/debian/copyright 2015-05-09 21:16:24.000000000 +0000 @@ -6,7 +6,7 @@ Files: * Copyright: 1998-2004, Jochen Wiedmann 2004-2009, Jeff Zucker - 2009-2014, H.Merijn Brand + 2009-2015, H.Merijn Brand License: Artistic or GPL-1+ Files: debian/* @@ -16,7 +16,7 @@ 2004, Christian Hammers 2004, Frank Lichtenheld 2004-2005, Gunnar Wolf - 2006-2014, gregor herrmann + 2006-2015, gregor herrmann 2009-2010, Jonathan Yu 2010-2011, Ansgar Burchardt 2010, Nicholas Bamber diff -Nru libdbd-csv-perl-0.4500/lib/Bundle/DBD/CSV.pm libdbd-csv-perl-0.4800/lib/Bundle/DBD/CSV.pm --- libdbd-csv-perl-0.4500/lib/Bundle/DBD/CSV.pm 2014-10-23 07:25:48.000000000 +0000 +++ libdbd-csv-perl-0.4800/lib/Bundle/DBD/CSV.pm 2015-02-11 14:55:54.000000000 +0000 @@ -21,15 +21,15 @@ =head1 CONTENTS -DBI 1.631 +DBI 1.633 -Text::CSV_XS 1.11 +Text::CSV_XS 1.15 SQL::Statement 1.405 -DBD::File 0.42 +DBD::File 0.44 -DBD::CSV 0.45 +DBD::CSV 0.48 =head1 DESCRIPTION @@ -44,7 +44,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2009-2014 by H.Merijn Brand +Copyright (C) 2009-2015 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -Nru libdbd-csv-perl-0.4500/lib/DBD/CSV/TypeInfo.pm libdbd-csv-perl-0.4800/lib/DBD/CSV/TypeInfo.pm --- libdbd-csv-perl-0.4500/lib/DBD/CSV/TypeInfo.pm 2013-07-29 15:41:42.000000000 +0000 +++ libdbd-csv-perl-0.4800/lib/DBD/CSV/TypeInfo.pm 2014-11-15 14:47:14.000000000 +0000 @@ -38,7 +38,7 @@ [ "VARCHAR", SQL_VARCHAR, undef, "'", "'", undef, 0, 1, 1, 0, undef, undef, undef, 1, 999999, undef, undef, undef, undef, ], - [ "CHAR", DBIstcf_DISCARD_STRING, undef, "'", "'", undef, 0, 1, 1, 0, + [ "CHAR", SQL_CHAR, undef, "'", "'", undef, 0, 1, 1, 0, undef, undef, undef, 1, 999999, undef, undef, undef, undef, ], [ "INTEGER", SQL_INTEGER, undef, "", "", undef, 0, 0, 1, 0, undef, diff -Nru libdbd-csv-perl-0.4500/lib/DBD/CSV.pm libdbd-csv-perl-0.4800/lib/DBD/CSV.pm --- libdbd-csv-perl-0.4500/lib/DBD/CSV.pm 2014-10-16 15:12:11.000000000 +0000 +++ libdbd-csv-perl-0.4800/lib/DBD/CSV.pm 2015-02-11 20:49:34.000000000 +0000 @@ -23,7 +23,7 @@ @ISA = qw( DBD::File ); -$VERSION = "0.45"; +$VERSION = "0.48"; $ATTRIBUTION = "DBD::CSV $DBD::CSV::VERSION by H.Merijn Brand"; $err = 0; # holds error code for DBI::err @@ -97,11 +97,31 @@ { my $dbh = shift; + # Straight from Text::CSV_XS.pm my @xs_attr = qw( - allow_loose_escapes allow_loose_quotes allow_whitespace - 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 ); + eol + sep_char + quote_char + escape_char + binary + decode_utf8 + auto_diag + diag_verbose + blank_is_undef + empty_is_undef + allow_whitespace + allow_loose_quotes + allow_loose_escapes + allow_unquoted_escape + always_quote + quote_space + escape_null + quote_binary + keep_meta_info + verbatim + types + callbacks + ); @csv_xs_attr{@xs_attr} = (); $dbh->{csv_xs_valid_attrs} = [ @xs_attr ]; @@ -136,7 +156,7 @@ my $dtype = $meta->{csv_class}; $dvsn and $dtype .= " ($dvsn)"; return sprintf "%s using %s", $dbh->{csv_version}, $dtype; - } # get_csv_versions + } # get_csv_versions sub get_info { @@ -1196,7 +1216,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2009-2014 by H.Merijn Brand +Copyright (C) 2009-2015 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -Nru libdbd-csv-perl-0.4500/Makefile.PL libdbd-csv-perl-0.4800/Makefile.PL --- libdbd-csv-perl-0.4500/Makefile.PL 2014-10-23 07:07:05.000000000 +0000 +++ libdbd-csv-perl-0.4800/Makefile.PL 2014-12-31 14:49:48.000000000 +0000 @@ -1,6 +1,6 @@ # -*- perl -*- -# Copyright (c) 2009-2014 H.Merijn Brand +# Copyright (c) 2009-2015 H.Merijn Brand require 5.008001; @@ -54,8 +54,8 @@ use vars qw( $DBI_INC_DIR ); { my $tmp_dir = File::Spec->tmpdir (); - my $default = $ENV{AUTOMATED_TESTING} ? "n" : "y"; - if (prompt ("Enable the use of $tmp_dir for tests?", $default) =~ m/[Yy]/) { + if (!$ENV{AUTOMATED_TESTING} && + prompt ("Enable the use of $tmp_dir for tests?", "y") =~ m/[Yy]/) { unlink "tests.skip"; } else { diff -Nru libdbd-csv-perl-0.4500/META.json libdbd-csv-perl-0.4800/META.json --- libdbd-csv-perl-0.4500/META.json 2014-10-23 07:27:11.000000000 +0000 +++ libdbd-csv-perl-0.4800/META.json 2015-02-11 20:50:35.000000000 +0000 @@ -1,77 +1,77 @@ { - "license" : [ - "perl_5" - ], + "release_status" : "stable", "prereqs" : { - "configure" : { + "build" : { "requires" : { - "ExtUtils::MakeMaker" : "0", - "DBI" : "1.628" + "Config" : "0" } }, "test" : { "recommends" : { - "Test::More" : "1.001008" + "Test::More" : "1.001014" }, "requires" : { "Test::Harness" : "0", - "Test::More" : "0.90", "charnames" : "0", - "Encode" : "0", - "Cwd" : "0" + "Cwd" : "0", + "Test::More" : "0.90", + "Encode" : "0" } }, - "runtime" : { - "recommends" : { - "perl" : "5.020000", - "DBI" : "1.631", - "Text::CSV_XS" : "1.11" - }, + "configure" : { "requires" : { - "SQL::Statement" : "1.405", - "perl" : "5.008001", "DBI" : "1.628", - "Text::CSV_XS" : "1.01", - "DBD::File" : "0.42" + "ExtUtils::MakeMaker" : "0" } }, - "build" : { + "runtime" : { + "recommends" : { + "DBD::File" : "0.44", + "Text::CSV_XS" : "1.15", + "DBI" : "1.633" + }, "requires" : { - "Config" : "0" + "Text::CSV_XS" : "1.01", + "DBI" : "1.628", + "SQL::Statement" : "1.405", + "DBD::File" : "0.42", + "perl" : "5.008001" } } }, + "meta-spec" : { + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", + "version" : "2" + }, + "dynamic_config" : 1, "abstract" : "DBI driver for CSV files", - "x_installdirs" : "site", + "name" : "DBD-CSV", "resources" : { + "license" : [ + "http://dev.perl.org/licenses/" + ], "repository" : { "type" : "git", "url" : "https://github.com/perl5-dbi/DBD-CSV.git", "web" : "https://github.com/perl5-dbi/DBD-CSV.git" - }, - "license" : [ - "http://dev.perl.org/licenses/" - ] + } }, - "dynamic_config" : 1, - "generated_by" : "Author", - "name" : "DBD-CSV", - "version" : "0.45", - "release_status" : "stable", "author" : [ "Jochen Wiedmann", "Jeff Zucker", "H.Merijn Brand ", "Jens Rehsack " ], + "generated_by" : "Author", + "x_installdirs" : "site", "provides" : { "DBD::CSV" : { - "version" : "0.45", + "version" : "0.48", "file" : "lib/DBD/CSV.pm" } }, - "meta-spec" : { - "version" : "2", - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" - } + "version" : "0.48", + "license" : [ + "perl_5" + ] } diff -Nru libdbd-csv-perl-0.4500/META.yml libdbd-csv-perl-0.4800/META.yml --- libdbd-csv-perl-0.4500/META.yml 2014-10-23 07:27:11.000000000 +0000 +++ libdbd-csv-perl-0.4800/META.yml 2015-02-11 20:50:35.000000000 +0000 @@ -11,7 +11,7 @@ DBI: '1.628' ExtUtils::MakeMaker: 0 dynamic_config: 1 -generated_by: Author, CPAN::Meta::Converter version 2.142690 +generated_by: Author, CPAN::Meta::Converter version 2.143240 license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,12 +20,12 @@ provides: DBD::CSV: file: lib/DBD/CSV.pm - version: '0.45' + version: '0.48' recommends: - DBI: '1.631' - Test::More: '1.001008' - Text::CSV_XS: '1.11' - perl: '5.020000' + DBD::File: '0.44' + DBI: '1.633' + Test::More: '1.001014' + Text::CSV_XS: '1.15' requires: Cwd: 0 DBD::File: '0.42' @@ -40,5 +40,5 @@ resources: license: http://dev.perl.org/licenses/ repository: https://github.com/perl5-dbi/DBD-CSV.git -version: '0.45' +version: '0.48' x_installdirs: site diff -Nru libdbd-csv-perl-0.4500/README libdbd-csv-perl-0.4800/README --- libdbd-csv-perl-0.4500/README 2014-01-01 10:42:19.000000000 +0000 +++ libdbd-csv-perl-0.4800/README 2014-12-31 14:49:41.000000000 +0000 @@ -9,7 +9,7 @@ values). Copying - Copyright (C) 2009-2014 by H.Merijn Brand + Copyright (C) 2009-2015 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -Nru libdbd-csv-perl-0.4500/t/42_bindparam.t libdbd-csv-perl-0.4800/t/42_bindparam.t --- libdbd-csv-perl-0.4500/t/42_bindparam.t 2013-07-29 15:00:48.000000000 +0000 +++ libdbd-csv-perl-0.4800/t/42_bindparam.t 2014-11-08 09:28:53.000000000 +0000 @@ -16,9 +16,6 @@ do "t/lib.pl"; -defined &SQL_VARCHAR or *SQL_VARCHAR = sub { 12 }; -defined &SQL_INTEGER or *SQL_INTEGER = sub { 4 }; - my @tbl_def = ( [ "id", "INTEGER", 4, 0 ], [ "name", "CHAR", 64, &COL_NULLABLE ], diff -Nru libdbd-csv-perl-0.4500/t/44_listfields.t libdbd-csv-perl-0.4800/t/44_listfields.t --- libdbd-csv-perl-0.4500/t/44_listfields.t 2013-07-30 10:32:17.000000000 +0000 +++ libdbd-csv-perl-0.4800/t/44_listfields.t 2014-11-16 11:44:27.000000000 +0000 @@ -9,10 +9,6 @@ BEGIN { use_ok ("DBI") } do "t/lib.pl"; -defined &SQL_CHAR or *SQL_CHAR = sub { 1 }; -defined &SQL_VARCHAR or *SQL_VARCHAR = sub { 12 }; -defined &SQL_INTEGER or *SQL_INTEGER = sub { 4 }; - my $nano = $ENV{DBI_SQL_NANO}; my @tbl_def = ( [ "id", "INTEGER", 4, &COL_KEY ], @@ -36,7 +32,7 @@ is ($sth->{NAME_uc}[1], uc $tbl_def[1][0], "NAME_uc"); is_deeply ($sth->{NAME_lc_hash}, { map { ( lc $tbl_def[$_][0] => $_ ) } 0 .. $#tbl_def }, "NAME_lc_hash"); -if ($DBD::File::VERSION gt "0.42") { +if ($DBD::File::VERSION gt "0.43") { is ($sth->{TYPE}[0], $nano ? &SQL_VARCHAR : &SQL_INTEGER, "TYPE 1"); is ($sth->{TYPE}[1], $nano ? &SQL_VARCHAR : &SQL_CHAR, "TYPE 2"); is ($sth->{PRECISION}[0], 0, "PRECISION 1"); diff -Nru libdbd-csv-perl-0.4500/t/55_dir_search.t libdbd-csv-perl-0.4800/t/55_dir_search.t --- libdbd-csv-perl-0.4500/t/55_dir_search.t 2014-10-23 07:11:30.000000000 +0000 +++ libdbd-csv-perl-0.4800/t/55_dir_search.t 2015-01-07 07:22:35.000000000 +0000 @@ -36,15 +36,15 @@ } @dsn; # Use $test_dir -$dbh->do ("create table foo (c_foo integer, foo char (1))"); -$dbh->do ("insert into foo values ($_, $_)") for 1, 2, 3; +$dbh->do ("create table fox (c_fox integer, fox char (1))"); +$dbh->do ("insert into fox values ($_, $_)") for 1, 2, 3; my @test_dirs = ($tstdir, @extdir); is ($dir{$_}, 1, "DSN for $_") for @test_dirs; my %tbl = map { $_ => 1 } $dbh->tables (undef, undef, undef, undef); -is ($tbl{$_}, 1, "Table $_ found") for qw( tmp foo ); +is ($tbl{$_}, 1, "Table $_ found") for qw( tmp fox ); my %data = ( tmp => { # t/tmp.csv @@ -52,26 +52,26 @@ 2 => "monkey", 3 => "gorilla", }, - foo => { # output123/foo.csv + fox => { # output123/fox.csv 1 => 1, 2 => 2, 3 => 3, }, ); -foreach my $tbl ("tmp", "foo") { +foreach my $tbl ("tmp", "fox") { my $sth = $dbh->prepare ("select * from $tbl"); $sth->execute; while (my $row = $sth->fetch) { is ($row->[1], $data{$tbl}{$row->[0]}, "$tbl ($row->[0], ...)"); } } -# Do not drop table foo yet +# Do not drop table fox yet ok ($dbh->disconnect, "disconnect"); chdir DbDir (); -my @f = grep m/^foo\.csv/i => glob "*.*"; -is (scalar @f, 1, "foo.csv still here"); +my @f = grep m/^fox\.csv/i => glob "*.*"; +is (scalar @f, 1, "fox.csv still here"); SKIP: { $DBD::File::VERSION < 0.43 and skip "DBD::File-0.43 required", 1; @@ -85,7 +85,7 @@ }), undef, "Should not be able to connect to non-exiting folder"); } -# drop table foo; +# drop table fox; @f and unlink @f; done_testing; diff -Nru libdbd-csv-perl-0.4500/t/61_meta.t libdbd-csv-perl-0.4800/t/61_meta.t --- libdbd-csv-perl-0.4500/t/61_meta.t 2014-05-12 06:05:36.000000000 +0000 +++ libdbd-csv-perl-0.4800/t/61_meta.t 2014-11-15 15:06:27.000000000 +0000 @@ -20,34 +20,38 @@ ok ($tbl = FindNewTable ($dbh), "find new test table"); } -if ($DBD::File::VERSION gt "0.42") { - note ("ScalarIO - no col_names"); - my $dbh = Connect (); - open my $data, "<", \$cnt; - $dbh->{csv_tables}->{data} = { - f_file => $data, - skip_rows => 4, - }; - my $sth = $dbh->prepare ("SELECT * FROM data"); - $sth->execute (); - my $rows = $sth->fetchall_arrayref (); - is_deeply ($rows, $expect, "all rows found - mem-io w/o col_names"); - } +TODO: { + local $TODO = "Streaming support"; + + if ($DBD::File::VERSION gt "0.44") { + note ("ScalarIO - no col_names"); + my $dbh = Connect (); + open my $data, "<", \$cnt; + $dbh->{csv_tables}->{data} = { + f_file => $data, + skip_rows => 4, + }; + my $sth = $dbh->prepare ("SELECT * FROM data"); + $sth->execute (); + my $rows = $sth->fetchall_arrayref (); + is_deeply ($rows, $expect, "all rows found - mem-io w/o col_names"); + } -if ($DBD::File::VERSION gt "0.42") { - note ("ScalarIO - with col_names"); - my $dbh = Connect (); - open my $data, "<", \$cnt; + if ($DBD::File::VERSION gt "0.44") { + note ("ScalarIO - with col_names"); + my $dbh = Connect (); + open my $data, "<", \$cnt; - $dbh->{csv_tables}->{data} = { - f_file => $data, - skip_rows => 4, - col_names => [qw(id name color)], - }; - my $sth = $dbh->prepare ("SELECT * FROM data"); - $sth->execute (); - my $rows = $sth->fetchall_arrayref (); - is_deeply ($rows, $expect, "all rows found - mem-io w col_names"); + $dbh->{csv_tables}->{data} = { + f_file => $data, + skip_rows => 4, + col_names => [qw(id name color)], + }; + my $sth = $dbh->prepare ("SELECT * FROM data"); + $sth->execute (); + my $rows = $sth->fetchall_arrayref (); + is_deeply ($rows, $expect, "all rows found - mem-io w col_names"); + } } my $fn = File::Spec->rel2abs (DbFile ($tbl)); diff -Nru libdbd-csv-perl-0.4500/t/lib.pl libdbd-csv-perl-0.4800/t/lib.pl --- libdbd-csv-perl-0.4500/t/lib.pl 2014-08-04 19:41:59.000000000 +0000 +++ libdbd-csv-perl-0.4800/t/lib.pl 2014-11-08 08:17:32.000000000 +0000 @@ -16,6 +16,11 @@ my $test_user = $ENV{DBI_USER} || ""; my $test_pass = $ENV{DBI_PASS} || ""; +DBI->import (":sql_types"); +defined &SQL_CHAR or *SQL_CHAR = sub { 1 }; +defined &SQL_VARCHAR or *SQL_VARCHAR = sub { 12 }; +defined &SQL_INTEGER or *SQL_INTEGER = sub { 4 }; + sub COL_NULLABLE () { 1 } sub COL_KEY () { 2 }