On Mon, 17 Feb 2014 23:37:46 +0000, Tim Bunce <tim.bu...@pobox.com> wrote:
> Any feedback at all? 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"; $ENV{DBI_DRIVER} = "Pg"; use lib 'in'; require DBIT_sth_ro::BasicPrepareExecuteSelect; DBIT_sth_ro::BasicPrepareExecuteSelect->run_tests; END { delete $ENV{DBI_PASS} } END { delete $ENV{DBI_USER} } END { delete $ENV{DBI_DSN} } END { delete $ENV{DBI_DRIVER} } $ 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! In testing DBD::Firebird, I created a test database with "" as password, and the DBD failed as it tested for truth. That has been fixed now, but alarm bells start to sound when I see above code -- 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/