Re: DBI_USER empty vs undef - Re: DBIT prototype - feedback wanted
On Tue, Feb 18, 2014 at 02:50:43PM +, Tim Bunce wrote: On Tue, Feb 18, 2014 at 10:15:53AM +0100, H.Merijn Brand wrote: I see a serious weekness. Don't know if it is Test::Database or DBI::Test, but the current templates do not seem to be able to see a difference between undef and for username and password: $ cat out/Default/Pg/Default/DBIT_sth_ro/BasicPrepareExecuteSelect.t #!perl use lib lib; $ENV{DBI_PASS} = ; $ENV{DBI_USER} = ; $ENV{DBI_DSN} = dbi:Pg:dbname=test; Drivers allow username and/or password to be undefined, but they also allow username/password to be the empty string, and these are two different things! The root cause is in Test::Database. I've opened a case for it: https://rt.cpan.org/Ticket/Display.html?id=93128 BooK has fixed that in T:DB v1.111 - please retry. Tim.
Re: DBI_USER empty vs undef - Re: DBIT prototype - feedback wanted
On Sun, 9 Mar 2014 13:29:32 +, Tim Bunce tim.bu...@pobox.com wrote: On Tue, Feb 18, 2014 at 02:50:43PM +, Tim Bunce wrote: On Tue, Feb 18, 2014 at 10:15:53AM +0100, H.Merijn Brand wrote: I see a serious weekness. Don't know if it is Test::Database or DBI::Test, but the current templates do not seem to be able to see a difference between undef and for username and password: $ cat out/Default/Pg/Default/DBIT_sth_ro/BasicPrepareExecuteSelect.t #!perl use lib lib; $ENV{DBI_PASS} = ; $ENV{DBI_USER} = ; $ENV{DBI_DSN} = dbi:Pg:dbname=test; Drivers allow username and/or password to be undefined, but they also allow username/password to be the empty string, and these are two different things! The root cause is in Test::Database. I've opened a case for it: https://rt.cpan.org/Ticket/Display.html?id=93128 BooK has fixed that in T:DB v1.111 - please retry. Hmmm, I don't know about fixed, but I installed that anyway. Reply includes both the Test::Database and the tumbler results BOOK/Test-Database-1.111.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /pro/bin/perl5.18.2 -MExtUtils::Command::MM -MTest::Harness -e undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/00-load.t ... 1/10 YAML::Tiny failed to classify line 'dbi:CSV::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. YAML::Tiny failed to classify line 'dbi:DBM::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. YAML::Tiny failed to classify line 'dbi:SQLite::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. # Tested Test::Database 1.111, Perl 5.018002, /pro/bin/perl5.18.2 t/00-load.t ... ok t/000-report-versions-tiny.t .. # # # Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.08 # perl: 5.018002 (wanted 5.006) on linux from /pro/bin/perl5.18.2 # # Carp = 1.32 (want any version) # Cwd = 3.40 (want any version) # DBD::DBM = 0.08 (want any version) # DBI = 1.631 (want any version) # ExtUtils::MakeMaker = 6.9(want 6.30) # File::Find= 1.23 (want any version) # File::HomeDir = 1.00 (want any version) # File::Path= 2.09 (want any version) # File::Spec= 3.40 (want any version) # File::Temp= 0.2304 (want any version) # List::Util= 1.38 (want any version) # Pod::Coverage::TrustPod = 0.13 (want any version) # SQL::Statement= 1.405 (want any version) # Test::CPAN::Meta = 0.23 (want any version) # Test::More= 1.001002 (want 0.88) # Test::Pod = 1.48 (want 1.41) # Test::Pod::Coverage = 1.08 (want 1.08) # YAML::Tiny= 1.61 (want any version) # strict= 1.07 (want any version) # version = 0.9908 (want 0.9901) # warnings = 1.18 (want any version) # # Thanks for using my code. I hope it works for you. # If not, please try and include this output in the bug report. # That will help me reproduce the issue and solve your problem. # t/000-report-versions-tiny.t .. ok t/08-handle.t . ok t/09-handle-dsn.t . ok t/10-drivers.t YAML::Tiny failed to classify line 'dbi:CSV::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. YAML::Tiny failed to classify line 'dbi:DBM::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. YAML::Tiny failed to classify line 'dbi:SQLite::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. t/10-drivers.t 1/7 # Failed test 'At least one driver loaded' # at t/10-drivers.t line 101. # '0' # = # '1' # Looks like you failed 1 test of 7. t/10-drivers.t Dubious, test returned 1 (wstat 256, 0x100) Failed 1/7 subtests t/10-list_drivers.t ... YAML::Tiny failed to classify line 'dbi:CSV::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. YAML::Tiny failed to classify line 'dbi:DBM::' at
Re: DBI_USER empty vs undef - Re: DBIT prototype - feedback wanted
On Sun, Mar 09, 2014 at 03:10:08PM +0100, H.Merijn Brand wrote: On Sun, 9 Mar 2014 13:29:32 +, Tim Bunce tim.bu...@pobox.com The root cause is in Test::Database. I've opened a case for it: https://rt.cpan.org/Ticket/Display.html?id=93128 BooK has fixed that in T:DB v1.111 - please retry. Hmmm, I don't know about fixed, but I installed that anyway. Reply includes both the Test::Database and the tumbler results YAML::Tiny failed to classify line 'dbi:DBM::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. That's the known problem with YAML::Tiny. You nees to run cpanm http://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.56.tar.gz See https://github.com/perl5-dbi/DBI-Test/tree/master/sandbox/tim#synopsis ... TL;DR Tim.
Re: DBI_USER empty vs undef - Re: DBIT prototype - feedback wanted
On Sun, 9 Mar 2014 19:46:19 +, Tim Bunce tim.bu...@pobox.com wrote: On Sun, Mar 09, 2014 at 03:10:08PM +0100, H.Merijn Brand wrote: On Sun, 9 Mar 2014 13:29:32 +, Tim Bunce tim.bu...@pobox.com The root cause is in Test::Database. I've opened a case for it: https://rt.cpan.org/Ticket/Display.html?id=93128 BooK has fixed that in T:DB v1.111 - please retry. Hmmm, I don't know about fixed, but I installed that anyway. Reply includes both the Test::Database and the tumbler results YAML::Tiny failed to classify line 'dbi:DBM::' at /home/merijn/.cpan/build/Test-Database-1.111-O2MmHq/blib/lib/Test/Database/Driver.pm line 102. That's the known problem with YAML::Tiny. You nees to run cpanm http://cpan.metacpan.org/authors/id/E/ET/ETHER/YAML-Tiny-1.56.tar.gz See https://github.com/perl5-dbi/DBI-Test/tree/master/sandbox/tim#synopsis I know, but with that Test::Database errored even more, so my hunch was that new release fixed more: Test::Database with YAML::Tiny-1.56 t/10-drivers.t 1/70 # CSV driver (created by Test::Database::Driver) # CSV driver (created by Test::Database::Driver::CSV) # DBM driver (created by Test::Database::Driver) # DBM driver (created by Test::Database::Driver::DBM) # SQLite driver (created by Test::Database::Driver) # SQLite driver (created by Test::Database::Driver::SQLite) t/10-drivers.t ok t/10-list_drivers.t ... ok t/11-available_dbname.t ... ok t/11-make_dsn.t ... ok t/11-version_matches.t ok t/12-load.t ... ok t/20-handles.t ok t/25-sql.t # SQL::Statement 1.405 # skipping DBM tests because of SQL::Statement bug t/25-sql.t 1/36 # Testing driver CSV 1.05, DBD::CSV 0.41 Use of uninitialized value $dbname in concatenation (.) or string at t/25-sql.t line 60. Use of uninitialized value $dbname in concatenation (.) or string at t/25-sql.t line 67. Use of uninitialized value $dbname in concatenation (.) or string at t/25-sql.t line 60. Use of uninitialized value $dbname in concatenation (.) or string at t/25-sql.t line 67. Use of uninitialized value $old in string eq at t/25-sql.t line 87. Use of uninitialized value $old in string eq at t/25-sql.t line 87. Use of uninitialized value $old in string eq at t/25-sql.t line 87. Use of uninitialized value $old in string eq at t/25-sql.t line 87. Use of uninitialized value $old in concatenation (.) or string at t/25-sql.t line 87. # Failed test 'Database still there' # at t/25-sql.t line 87. Can't open directory /tmp/Test-Database-merijn/CSV for reading: No such file or directory at t/25-sql.t line 90. # Looks like you planned 36 tests but ran 16. # Looks like you failed 1 test of 16 run. # Looks like your test exited with 2 just after 16. t/25-sql.t Dubious, test returned 2 (wstat 512, 0x200) Failed 21/36 subtests t/pod-coverage.t .. ok t/pod.t ... ok t/release-distmeta.t .. skipped: these tests are for release candidate testing t/release-pod-coverage.t .. skipped: these tests are for release candidate testing t/release-pod-syntax.t skipped: these tests are for release candidate testing ... TL;DR Tim. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/