Hello community, here is the log from the commit of package perl-DBD-CSV for openSUSE:Factory checked in at 2017-10-09 19:46:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-DBD-CSV (Old) and /work/SRC/openSUSE:Factory/.perl-DBD-CSV.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DBD-CSV" Mon Oct 9 19:46:01 2017 rev:32 rq:532534 version:0.49 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-DBD-CSV/perl-DBD-CSV.changes 2015-04-18 10:40:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-DBD-CSV.new/perl-DBD-CSV.changes 2017-10-09 19:48:13.011595231 +0200 @@ -1,0 +2,16 @@ +Sun Oct 8 08:14:15 UTC 2017 - co...@suse.com + +- updated to 0.49 + see /usr/share/doc/packages/perl-DBD-CSV/ChangeLog + + 0.49 - 2016-05-12, H.Merijn Brand + * Simplified test-table-name generation + * Prefer quote_empty over quote_always for size (Text::CSV_XS => 1.18) + * Add CONTRIBUTING.md + * It's 2016 + * Added docs to warn for reserved words (RT#106529) + * Minor spelling corrections (PRC Guillermo O. Freschi) + * Test with perl 5.24.0, DBI 1.636, SQL::Statement-1.410, and + Text::CSV_XS-1.23 + +------------------------------------------------------------------- Old: ---- DBD-CSV-0.48.tgz New: ---- DBD-CSV-0.49.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-DBD-CSV.spec ++++++ --- /var/tmp/diff_new_pack.bzvsot/_old 2017-10-09 19:48:13.815559897 +0200 +++ /var/tmp/diff_new_pack.bzvsot/_new 2017-10-09 19:48:13.831559193 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-DBD-CSV # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,14 +17,14 @@ Name: perl-DBD-CSV -Version: 0.48 +Version: 0.49 Release: 0 %define cpan_name DBD-CSV Summary: DBI driver for CSV files License: Artistic-1.0 or GPL-1.0+ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/DBD-CSV/ -Source0: http://www.cpan.org/authors/id/H/HM/HMBRAND/%{cpan_name}-%{version}.tgz +Source0: https://cpan.metacpan.org/authors/id/H/HM/HMBRAND/%{cpan_name}-%{version}.tgz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,9 +41,10 @@ Requires: perl(Test::More) >= 0.9 Requires: perl(Text::CSV_XS) >= 1.01 Recommends: perl(DBD::File) >= 0.44 -Recommends: perl(DBI) >= 1.633 -Recommends: perl(Test::More) >= 1.001014 -Recommends: perl(Text::CSV_XS) >= 1.15 +Recommends: perl(DBI) >= 1.636 +Recommends: perl(SQL::Statement) >= 1.410 +Recommends: perl(Test::More) >= 1.302015 +Recommends: perl(Text::CSV_XS) >= 1.23 %{perl_requires} %description @@ -53,13 +54,12 @@ CSV files (Comma Separated Values). Such files are often used for exporting MS Access and MS Excel data. -See the DBI manpage for details on DBI, the SQL::Statement manpage for -details on SQL::Statement and the DBD::File manpage for details on the base -class DBD::File. +See DBI for details on DBI, SQL::Statement for details on SQL::Statement +and DBD::File for details on the base class DBD::File. %prep %setup -q -n %{cpan_name}-%{version} -find . -type f -print0 | xargs -0 chmod 644 +find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -75,6 +75,6 @@ %files -f %{name}.files %defattr(-,root,root,755) -%doc ChangeLog examples README +%doc ChangeLog CONTRIBUTING.md examples README %changelog ++++++ DBD-CSV-0.48.tgz -> DBD-CSV-0.49.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/CONTRIBUTING.md new/DBD-CSV-0.49/CONTRIBUTING.md --- old/DBD-CSV-0.48/CONTRIBUTING.md 1970-01-01 01:00:00.000000000 +0100 +++ new/DBD-CSV-0.49/CONTRIBUTING.md 2015-08-07 13:18:06.000000000 +0200 @@ -0,0 +1,27 @@ +# General + +I am always open to improvements and suggestions. +Use [issues](https://github.com/perl5-dbi/DBD-CSV/issues) + +As this is a module inside the perl5 DBI group, additional +requirements might apply. + +Communicate on IRC with the co-maints: irc.perl.org channel #dbi + +# Style + +I will never accept pull request that do not strictly conform to my +style, however you might hate it. You can read the reasoning behind +my [preferences](http://tux.nl/style.html). + +I really do not care about mixed spaces and tabs in (leading) whitespace + +Perl::Tidy will help getting the code in shape, but as all software, it +is not perfect. You can find my preferences for these in +[.perltidy](https://github.com/Tux/Release-Checklist/blob/master/.perltidyrc) and +[.perlcritic](https://github.com/Tux/Release-Checklist/blob/master/.perlcriticrc). + +# Requirements + +The minimum version required to use this module is stated in +[Makefile.PL](./Makefile.PL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/ChangeLog new/DBD-CSV-0.49/ChangeLog --- old/DBD-CSV-0.48/ChangeLog 2015-02-11 21:48:05.000000000 +0100 +++ new/DBD-CSV-0.49/ChangeLog 2016-05-12 11:27:47.000000000 +0200 @@ -1,3 +1,13 @@ +0.49 - 2016-05-12, H.Merijn Brand + * Simplified test-table-name generation + * Prefer quote_empty over quote_always for size (Text::CSV_XS => 1.18) + * Add CONTRIBUTING.md + * It's 2016 + * Added docs to warn for reserved words (RT#106529) + * Minor spelling corrections (PRC Guillermo O. Freschi) + * Test with perl 5.24.0, DBI 1.636, SQL::Statement-1.410, and + Text::CSV_XS-1.23 + 0.48 - 2015-02-11, H.Merijn Brand * Update list of valid Text::CSV_XS attributes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/MANIFEST new/DBD-CSV-0.49/MANIFEST --- old/DBD-CSV-0.48/MANIFEST 2015-02-11 21:50:34.000000000 +0100 +++ new/DBD-CSV-0.49/MANIFEST 2016-05-12 11:58:56.000000000 +0200 @@ -2,17 +2,12 @@ MANIFEST MANIFEST.SKIP Makefile.PL +CONTRIBUTING.md README lib/Bundle/DBD/CSV.pm lib/DBD/CSV.pm lib/DBD/CSV/TypeInfo.pm lib/DBD/CSV/GetInfo.pm -lib/DBI/Test/Case/DBD/CSV/t10_base.pm -lib/DBI/Test/Case/DBD/CSV/t11_dsnlist.pm -lib/DBI/Test/Case/DBD/CSV/t20_createdrop.pm -lib/DBI/Test/Case/DBD/CSV/t85_error.pm -lib/DBI/Test/DBD/CSV/Conf.pm -lib/DBI/Test/DBD/CSV/List.pm t/00_meta.t t/00_pod_cov.t t/00_pod.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/MANIFEST.SKIP new/DBD-CSV-0.49/MANIFEST.SKIP --- old/DBD-CSV-0.48/MANIFEST.SKIP 2013-08-13 13:06:06.000000000 +0200 +++ new/DBD-CSV-0.49/MANIFEST.SKIP 2015-05-15 15:49:33.000000000 +0200 @@ -5,8 +5,10 @@ \.tgz$ \.tar\.gz$ \.git +\.travis.yml blib/ cover_db/ +lib/DBI genMETA.pl Makefile MANIFEST.SKIP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/META.json new/DBD-CSV-0.49/META.json --- old/DBD-CSV-0.48/META.json 2015-02-11 21:50:35.000000000 +0100 +++ new/DBD-CSV-0.49/META.json 2016-05-12 11:58:56.000000000 +0200 @@ -1,77 +1,78 @@ { + "meta-spec" : { + "version" : "2", + "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec" + }, + "generated_by" : "Author", + "license" : [ + "perl_5" + ], + "author" : [ + "Jochen Wiedmann", + "Jeff Zucker", + "H.Merijn Brand <h.m.br...@xs4all.nl>", + "Jens Rehsack <rehs...@cpan.org>" + ], + "dynamic_config" : 1, "release_status" : "stable", + "resources" : { + "repository" : { + "web" : "https://github.com/perl5-dbi/DBD-CSV.git", + "url" : "https://github.com/perl5-dbi/DBD-CSV.git", + "type" : "git" + }, + "license" : [ + "http://dev.perl.org/licenses/" + ] + }, + "x_installdirs" : "site", + "version" : "0.49", + "name" : "DBD-CSV", "prereqs" : { - "build" : { + "configure" : { "requires" : { - "Config" : "0" + "DBI" : "1.628", + "ExtUtils::MakeMaker" : "0" } }, "test" : { "recommends" : { - "Test::More" : "1.001014" + "Test::More" : "1.302015" }, "requires" : { "Test::Harness" : "0", - "charnames" : "0", "Cwd" : "0", "Test::More" : "0.90", - "Encode" : "0" + "Encode" : "0", + "charnames" : "0" } }, - "configure" : { + "build" : { "requires" : { - "DBI" : "1.628", - "ExtUtils::MakeMaker" : "0" + "Config" : "0" } }, "runtime" : { - "recommends" : { - "DBD::File" : "0.44", - "Text::CSV_XS" : "1.15", - "DBI" : "1.633" - }, "requires" : { - "Text::CSV_XS" : "1.01", - "DBI" : "1.628", "SQL::Statement" : "1.405", + "perl" : "5.008001", "DBD::File" : "0.42", - "perl" : "5.008001" + "DBI" : "1.628", + "Text::CSV_XS" : "1.01" + }, + "recommends" : { + "SQL::Statement" : "1.410", + "Text::CSV_XS" : "1.23", + "DBI" : "1.636", + "DBD::File" : "0.44" } } }, - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "dynamic_config" : 1, - "abstract" : "DBI driver for CSV files", - "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" - } - }, - "author" : [ - "Jochen Wiedmann", - "Jeff Zucker", - "H.Merijn Brand <h.m.br...@xs4all.nl>", - "Jens Rehsack <rehs...@cpan.org>" - ], - "generated_by" : "Author", - "x_installdirs" : "site", "provides" : { "DBD::CSV" : { - "version" : "0.48", + "version" : "0.49", "file" : "lib/DBD/CSV.pm" } }, - "version" : "0.48", - "license" : [ - "perl_5" - ] + "abstract" : "DBI driver for CSV files" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/META.yml new/DBD-CSV-0.49/META.yml --- old/DBD-CSV-0.48/META.yml 2015-02-11 21:50:35.000000000 +0100 +++ new/DBD-CSV-0.49/META.yml 2016-05-12 11:58:56.000000000 +0200 @@ -11,7 +11,7 @@ DBI: '1.628' ExtUtils::MakeMaker: 0 dynamic_config: 1 -generated_by: Author, CPAN::Meta::Converter version 2.143240 +generated_by: Author, CPAN::Meta::Converter version 2.150005 license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -20,12 +20,13 @@ provides: DBD::CSV: file: lib/DBD/CSV.pm - version: '0.48' + version: '0.49' recommends: DBD::File: '0.44' - DBI: '1.633' - Test::More: '1.001014' - Text::CSV_XS: '1.15' + DBI: '1.636' + SQL::Statement: '1.410' + Test::More: '1.302015' + Text::CSV_XS: '1.23' requires: Cwd: 0 DBD::File: '0.42' @@ -40,5 +41,5 @@ resources: license: http://dev.perl.org/licenses/ repository: https://github.com/perl5-dbi/DBD-CSV.git -version: '0.48' +version: '0.49' x_installdirs: site diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/Makefile.PL new/DBD-CSV-0.49/Makefile.PL --- old/DBD-CSV-0.48/Makefile.PL 2014-12-31 15:49:48.000000000 +0100 +++ new/DBD-CSV-0.49/Makefile.PL 2016-01-02 15:43:00.000000000 +0100 @@ -1,6 +1,6 @@ # -*- perl -*- -# Copyright (c) 2009-2015 H.Merijn Brand +# Copyright (c) 2009-2016 H.Merijn Brand require 5.008001; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/README new/DBD-CSV-0.49/README --- old/DBD-CSV-0.48/README 2014-12-31 15:49:41.000000000 +0100 +++ new/DBD-CSV-0.49/README 2016-01-02 15:43:04.000000000 +0100 @@ -9,7 +9,7 @@ values). Copying - Copyright (C) 2009-2015 by H.Merijn Brand + Copyright (C) 2009-2016 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/Bundle/DBD/CSV.pm new/DBD-CSV-0.49/lib/Bundle/DBD/CSV.pm --- old/DBD-CSV-0.48/lib/Bundle/DBD/CSV.pm 2015-02-11 15:55:54.000000000 +0100 +++ new/DBD-CSV-0.49/lib/Bundle/DBD/CSV.pm 2016-05-10 16:32:42.000000000 +0200 @@ -5,7 +5,7 @@ use strict; use warnings; -our $VERSION = "1.12"; +our $VERSION = "1.13"; 1; @@ -21,15 +21,15 @@ =head1 CONTENTS -DBI 1.633 +DBI 1.636 -Text::CSV_XS 1.15 +Text::CSV_XS 1.23 -SQL::Statement 1.405 +SQL::Statement 1.410 DBD::File 0.44 -DBD::CSV 0.48 +DBD::CSV 0.49 =head1 DESCRIPTION @@ -44,7 +44,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2009-2015 by H.Merijn Brand +Copyright (C) 2009-2016 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBD/CSV.pm new/DBD-CSV-0.49/lib/DBD/CSV.pm --- old/DBD-CSV-0.48/lib/DBD/CSV.pm 2015-02-11 21:49:34.000000000 +0100 +++ new/DBD-CSV-0.49/lib/DBD/CSV.pm 2016-03-18 14:55:24.000000000 +0100 @@ -23,7 +23,7 @@ @ISA = qw( DBD::File ); -$VERSION = "0.48"; +$VERSION = "0.49"; $ATTRIBUTION = "DBD::CSV $DBD::CSV::VERSION by H.Merijn Brand"; $err = 0; # holds error code for DBI::err @@ -114,6 +114,7 @@ allow_loose_escapes allow_unquoted_escape always_quote + quote_empty quote_space escape_null quote_binary @@ -223,7 +224,8 @@ exists $dbh->{"csv_$attr"} and $opts{$attr} = $dbh->{"csv_$attr"}; } $dbh->{csv_null} || $meta->{csv_null} and - $opts{blank_is_undef} = $opts{always_quote} = 1; + $opts{Text::CSV_XS->version < 1.18 ? "always_quote" : "quote_empty"} = + $opts{blank_is_undef} = 1; my $class = $meta->{csv_class}; my $eol = $meta->{csv_eol}; @@ -525,7 +527,7 @@ syntax supported in DBD::CSV. Table- and column-names are case insensitive unless quoted. Column names -will be sanitized unless L</raw_header> is true; +will be sanitized unless L</raw_header> is true. =head1 Using DBD::CSV with DBI @@ -1039,6 +1041,18 @@ for you, count the number of columns and create column names like C<col0>, C<col1>, ... +Note that column names that match reserved SQL words will cause unwanted +and sometimes confusing errors. If your CSV has headers that match reserved +words, you will require these two attributes. + +If C<test.csv> looks like + + select,from + 1,2 + +the select query would result in C<select select, from from test;>, which +obviously is illegal SQL. + =item raw_header X<raw_header> @@ -1216,7 +1230,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (C) 2009-2015 by H.Merijn Brand +Copyright (C) 2009-2016 by H.Merijn Brand Copyright (C) 2004-2009 by Jeff Zucker Copyright (C) 1998-2004 by Jochen Wiedmann diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t10_base.pm new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t10_base.pm --- old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t10_base.pm 2013-08-14 13:42:26.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t10_base.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,56 +0,0 @@ -package DBI::Test::Case::DBD::CSV::t10_base; - -use strict; -use warnings; - -use parent qw( DBI::Test::DBD::CSV::Case); - -use Test::More; -use DBI::Test; -use DBI; - -sub supported_variant -{ - my ($self, $test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options) = @_; - - $self->is_test_for_mocked ($test_confs) and return; - - return $self->SUPER::supported_variant ($test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options); - } # supported_variant - -sub run_test -{ - my ($self, $dbc) = @_; - my @DB_CREDS = @$dbc; - $DB_CREDS[3]->{PrintError} = 0; - $DB_CREDS[3]->{RaiseError} = 0; - if ($ENV{DBI_PUREPERL}) { - eval "use Text::CSV;"; - $@ or $DB_CREDS[3]->{csv_class} = "Text::CSV" - } - - defined $ENV{DBI_SQL_NANO} or - eval "use SQL::Statement;"; - - ok (my $switch = DBI->internal, "DBI->internal"); - is (ref $switch, "DBI::dr", "Driver class"); - - # This is a special case. install_driver should not normally be used. - ok (my $drh = DBI->install_driver ("CSV"), "Install driver"); - - is (ref $drh, "DBI::dr", "Driver class installed"); - - ok ($drh->{Version}, "Driver version $drh->{Version}"); - - my $dbh = connect_ok (@DB_CREDS, "Connect with dbi:CSV:"); - - my $csv_version_info = $dbh->csv_versions (); - ok ($csv_version_info, "csv_versions"); - diag ($csv_version_info); - - done_testing (); - } - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t11_dsnlist.pm new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t11_dsnlist.pm --- old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t11_dsnlist.pm 2013-08-14 14:24:37.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t11_dsnlist.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,64 +0,0 @@ -package DBI::Test::Case::DBD::CSV::t11_dsnlist; - -use strict; -use warnings; - -use parent qw( DBI::Test::DBD::CSV::Case); - -use Test::More; -use DBI::Test; -use DBI; - -sub supported_variant -{ - my ($self, $test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options) = @_; - - $self->is_test_for_mocked ($test_confs) and return; - - return $self->SUPER::supported_variant ($test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options); - } # supported_variant - -use vars q{$AUTOLOAD}; -sub AUTOLOAD -{ - (my $sub = $AUTOLOAD) =~ s/.*:/DBI::Test::DBD::CSV::Case::/; - { no strict "refs"; - $sub->(@_); - } - } # AUTOLOAD - -sub run_test -{ - my ($self, $dbc) = @_; - my @DB_CREDS = @$dbc; - $DB_CREDS[3]->{PrintError} = 0; - $DB_CREDS[3]->{RaiseError} = 0; - if ($ENV{DBI_PUREPERL}) { - eval "use Text::CSV;"; - $@ or $DB_CREDS[3]->{csv_class} = "Text::CSV" - } - - defined $ENV{DBI_SQL_NANO} or - eval "use SQL::Statement;"; - - my $dbh = connect_ok (@DB_CREDS, "Connect with dbi:CSV:"); - - ok ($dbh->ping, "ping"); - - # This returns at least ".", "lib", and "t" - ok (my @dsn = DBI->data_sources ("CSV"), "data_sources"); - ok (@dsn >= 2, "more than one"); - ok ($dbh->disconnect, "disconnect"); - - # Try different DSN's - foreach my $d (qw( . example lib t )) { - ok (my $dns = Connect ("dbi:CSV:f_dir=$d"), "use $d as f_dir"); - ok ($dbh->disconnect, "disconnect"); - } - - done_testing (); - } # run_test - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t20_createdrop.pm new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t20_createdrop.pm --- old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t20_createdrop.pm 2013-09-17 20:38:13.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t20_createdrop.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,68 +0,0 @@ -package DBI::Test::Case::DBD::CSV::t20_createdrop; - -use strict; -use warnings; - -use parent qw( DBI::Test::DBD::CSV::Case ); - -use Test::More; -use DBI::Test; -use DBI; - -sub supported_variant -{ - my ($self, $test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options) = @_; - - $self->is_test_for_mocked ($test_confs) and return; - - return $self->SUPER::supported_variant ($test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options); - } # supported_variant - -my @tbl_def = ( - [ "id", "INTEGER", 4, 0 ], - [ "name", "CHAR", 64, 0 ], - ); - -use vars q{$AUTOLOAD}; -sub AUTOLOAD -{ - (my $sub = $AUTOLOAD) =~ s/.*:/DBI::Test::DBD::CSV::Case::/; - { no strict "refs"; - $sub->(@_); - } - } # AUTOLOAD - -sub run_test -{ - my ($self, $dbc) = @_; - my @DB_CREDS = @$dbc; - $DB_CREDS[3]->{PrintError} = 0; - $DB_CREDS[3]->{RaiseError} = 0; - $DB_CREDS[3]->{f_dir} = DbDir (); - if ($ENV{DBI_PUREPERL}) { - eval "use Text::CSV;"; - $@ or $DB_CREDS[3]->{csv_class} = "Text::CSV" - } - - defined $ENV{DBI_SQL_NANO} or - eval "use SQL::Statement;"; - - my $dbh = connect_ok (@DB_CREDS, "Connect with dbi:CSV:"); - - ok (my $tbl = FindNewTable ($dbh), "find new test table"); - - like (my $def = TableDefinition ($tbl, @tbl_def), - qr{^create table $tbl}i, "table definition"); - do_ok ($dbh, $def, "create table"); - my $tbl_file = DbFile ($tbl); - ok (-s $tbl_file, "file exists"); - do_ok ($dbh, "drop table $tbl", "drop table"); - ok ($dbh->disconnect, "disconnect"); - ok (!-f $tbl_file, "file removed"); - - done_testing (); - } # run_test - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t85_error.pm new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t85_error.pm --- old/DBD-CSV-0.48/lib/DBI/Test/Case/DBD/CSV/t85_error.pm 2013-09-17 21:12:17.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/Case/DBD/CSV/t85_error.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,83 +0,0 @@ -package DBI::Test::Case::DBD::CSV::t85_error; - -use strict; -use warnings; - -use parent qw( DBI::Test::DBD::CSV::Case ); - -use Test::More; -use DBI::Test; -use DBI; - -sub supported_variant -{ - my ($self, $test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options) = @_; - - $self->is_test_for_mocked ($test_confs) and return; - - return $self->SUPER::supported_variant ($test_case, $cfg_pfx, $test_confs, - $dsn_pfx, $dsn_cred, $options); - } # supported_variant - -my @tbl_def = ( - [ "id", "INTEGER", 4, 0 ], - [ "name", "CHAR", 64, 0 ], - ); - -use vars q{$AUTOLOAD}; -sub AUTOLOAD -{ - (my $sub = $AUTOLOAD) =~ s/.*:/DBI::Test::DBD::CSV::Case::/; - { no strict "refs"; - $sub->(@_); - } - } # AUTOLOAD - -sub run_test -{ - my ($self, $dbc) = @_; - my @DB_CREDS = @$dbc; - $DB_CREDS[3]->{PrintError} = 0; - $DB_CREDS[3]->{RaiseError} = 0; - $DB_CREDS[3]->{f_dir} = DbDir (); - if ($ENV{DBI_PUREPERL}) { - eval "use Text::CSV;"; - $@ or $DB_CREDS[3]->{csv_class} = "Text::CSV" - } - - defined $ENV{DBI_SQL_NANO} or - eval "use SQL::Statement;"; - - my $dbh = connect_ok (@DB_CREDS, "Connect with dbi:CSV:"); - - ok (my $tbl = FindNewTable ($dbh), "find new test table"); - - like (my $def = TableDefinition ($tbl, @tbl_def), - qr{^create table $tbl}i, "table definition"); - do_ok ($dbh, $def, "create table"); - my $tbl_file = DbFile ($tbl); - ok (-s $tbl_file, "file exists"); - ok ($dbh->disconnect, "disconnect"); - undef $dbh; - - ok (-f $tbl_file, "file still there"); - open my $fh, ">>", $tbl_file; - print $fh qq{1, "p0wnd",",""",0\n}; # Very bad content - close $fh; - - ok ($dbh = connect_ok (@DB_CREDS, "Connect with dbi:CSV:")); - { local $dbh->{PrintError} = 0; - local $dbh->{RaiseError} = 0; - my $sth = prepare_ok ($dbh, "select * from $tbl", "prepare"); - is ($sth->execute, undef, "execute should fail"); - # It is safe to regex on this text, as it is NOT local dependant - like ($dbh->errstr, qr{\w+ \@ line [0-9?]+ pos [0-9?]+}, "error message"); - }; - do_ok ($dbh, "drop table $tbl", "drop"); - ok ($dbh->disconnect, "disconnect"); - - done_testing (); - } # run_test - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/DBD/CSV/Conf.pm new/DBD-CSV-0.49/lib/DBI/Test/DBD/CSV/Conf.pm --- old/DBD-CSV-0.48/lib/DBI/Test/DBD/CSV/Conf.pm 2013-08-13 13:03:51.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/DBD/CSV/Conf.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -#!/usr/bin/perl - -package DBI::Test::DBD::CSV::Conf; - -use strict; -use warnings; -use parent qw( DBI::Test::Conf ); - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/lib/DBI/Test/DBD/CSV/List.pm new/DBD-CSV-0.49/lib/DBI/Test/DBD/CSV/List.pm --- old/DBD-CSV-0.48/lib/DBI/Test/DBD/CSV/List.pm 2013-08-12 14:13:07.000000000 +0200 +++ new/DBD-CSV-0.49/lib/DBI/Test/DBD/CSV/List.pm 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -#!/usr/bin/perl - -package DBI::Test::DBD::CSV::List; - -use strict; -use warnings; -use parent "DBI::Test::List"; - -sub test_cases -{ - my @pm = glob "lib/DBI/Test/Case/DBD/CSV/*.pm"; - s{lib/DBI/Test/Case/DBD/CSV/(\S+)\.pm}{DBD::CSV::$1} for @pm; - return @pm; - } # test_cases - -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/t/42_bindparam.t new/DBD-CSV-0.49/t/42_bindparam.t --- old/DBD-CSV-0.48/t/42_bindparam.t 2014-11-08 10:28:53.000000000 +0100 +++ new/DBD-CSV-0.49/t/42_bindparam.t 2016-01-25 22:57:22.000000000 +0100 @@ -58,7 +58,7 @@ undef $dbh; -# And now retreive the rows using bind_columns +# And now retrieve the rows using bind_columns ok ($dbh = Connect ({ csv_null => 1 }), "connect"); ok ($sth = $dbh->prepare ("select * from $tbl order by id"), "prepare"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/t/51_commit.t new/DBD-CSV-0.49/t/51_commit.t --- old/DBD-CSV-0.48/t/51_commit.t 2013-07-29 16:58:27.000000000 +0200 +++ new/DBD-CSV-0.49/t/51_commit.t 2016-01-25 22:57:22.000000000 +0100 @@ -65,7 +65,7 @@ # Check whether rollback issues a warning in AutoCommit mode # We accept error messages as being legal, because the DBI -# requirement of just issueing a warning seems scary. +# requirement of just issuing a warning seems scary. ok ($dbh->do ("insert into $tbl values (3, 'Alligator')"), "insert 3"); is ($dbh->{AutoCommit}, 1, "AutoCommit on"); { my $got_warn = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/t/80_rt.t new/DBD-CSV-0.49/t/80_rt.t --- old/DBD-CSV-0.48/t/80_rt.t 2013-08-13 13:20:36.000000000 +0200 +++ new/DBD-CSV-0.49/t/80_rt.t 2016-01-25 22:57:22.000000000 +0100 @@ -336,7 +336,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 +�61168� - Specifying separation character per table does not work "HEADER1";"HEADER2" Volki;Bolki Zolki;Solki diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/t/85_error.t new/DBD-CSV-0.49/t/85_error.t --- old/DBD-CSV-0.48/t/85_error.t 2013-07-25 18:23:17.000000000 +0200 +++ new/DBD-CSV-0.49/t/85_error.t 2016-01-25 22:57:22.000000000 +0100 @@ -33,7 +33,7 @@ local $dbh->{RaiseError} = 0; ok (my $sth = $dbh->prepare ("select * from $tbl"), "prepare"); is ($sth->execute, undef, "execute should fail"); - # It is safe to regex on this text, as it is NOT local dependant + # It is safe to regex on this text, as it is NOT local dependent like ($dbh->errstr, qr{\w+ \@ line [0-9?]+ pos [0-9?]+}, "error message"); }; ok ($dbh->do ("drop table $tbl"), "drop"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/DBD-CSV-0.48/t/lib.pl new/DBD-CSV-0.49/t/lib.pl --- old/DBD-CSV-0.48/t/lib.pl 2014-11-08 09:17:32.000000000 +0100 +++ new/DBD-CSV-0.49/t/lib.pl 2016-01-25 22:57:22.000000000 +0100 @@ -1,7 +1,7 @@ #!/usr/bin/perl # lib.pl is the file where database specific things should live, -# whereever possible. For example, you define certain constants +# wherever possible. For example, you define certain constants # here and the like. use strict; @@ -118,40 +118,18 @@ { my $listTablesHook; my $testtable = "testaa"; - my $listed = 0; - - my @tables; sub FindNewTable { my $dbh = shift; - unless ($listed) { - if (defined $listTablesHook) { - @tables = $listTablesHook->($dbh); - } - elsif (defined &ListTables) { - @tables = ListTables ($dbh); - } - else { - die "Fatal: ListTables not implemented.\n"; - } - $listed = 1; - } + my @tables = defined $listTablesHook ? $listTablesHook->($dbh) + : defined &ListTables ? ListTables ($dbh) + : die "Fatal: ListTables not implemented.\n"; - # A small loop to find a free test table we can use to mangle stuff in - # and out of. This starts at testaa and loops until testaz, then testba - # - testbz and so on until testzz. - my $foundtesttable = 1; my $table; - while ($foundtesttable) { - $foundtesttable = 0; - foreach $table (@tables) { - if ($table eq $testtable) { - $testtable++; - $foundtesttable = 1; - } - } + while (grep { $_ eq $testtable } @tables) { + $testtable++; } $table = $testtable; $testtable++;