Subject: | Too old DBD::SQLite makes test to fail |
I just tried to install Class::DBI. Perl 5.6.1, w2k. After a lot of fiddling around, all tests now pass.
First, e.g. test 05-Query failed. This was because I had an old version (0.17) of DBD::SQLite that didn't support the table aliasing syntax.
Upgrading to the latest DBD::SQLite solved that problem. I propose that some kind of version requirement is specified somewhere to skip tests unless a new DBD::SQLite is present.
Second, test 98-failure.t failed.
This line
local *Ima::DBI::st::execute = sub { die "Database died" };
isn't enough to cause a die, since it seems that Ima::DBI is not in the ISA hierarchy. I traced the call to DBIx::ContextualFetch where the line "my $ret = $sth->SUPER::execute(@_);" in sub _untaint_execute seems to not call Ima::DBI::st::execute, but DBI::st::execute. Adding this line
local *DBI::st::execute = sub { die "Database died" };
causes the tests to fail properly. I'm not sure that's correct, but it seems to emulate the "correctly failing" behaviour.
One or both of these probably fails the automatic tests at ActiveState, so no PPM is available for this at the place where people mostly look for it.