Skip Menu |

This queue is for tickets about the Bot-BasicBot-Pluggable CPAN distribution.

Report information
The Basics
Id: 130948
Status: resolved
Priority: 0/
Queue: Bot-BasicBot-Pluggable

People
Owner: Nobody in particular
Requestors: cpan [...] desert-island.me.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Loading bug in Store::DBI
Bot::BasicBot::Pluggable::Module::SimpleBlog has a bunch of fails, because it is loading Store::DBI in its tests.. Looks like the Pluggable tests don't directly test Store loading for DBI, if I add this to 03store.t: isa_ok( Bot::BasicBot::Pluggable::Store->new("DBI"), 'Bot::BasicBot::Pluggable::Store::DBI' ); isa_ok( Bot::BasicBot::Pluggable::Store->new( { type => "DBI" } ), 'Bot::BasicBot::Pluggable::Store::DBI' ); I get these errors: DBD::SQLite::db do failed: table "basicbot" already exists at /usr/src/perl/Bot-BasicBot-Pluggable-1.20/lib/Bot/BasicBot/Pluggable/Store/DBI.pm line 36. ok 4 - An object of class 'Bot::BasicBot::Pluggable::Store::DBI' isa 'Bot::BasicBot::Pluggable::Store::DBI' DBD::SQLite::db do failed: table "basicbot" already exists at /usr/src/perl/Bot-BasicBot-Pluggable-1.20/lib/Bot/BasicBot/Pluggable/Store/DBI.pm line 36. (tho it doesnt actually fail, grrr) Anyway it looks like DBD::SQLite's syntax for table_info changed at some point.. I changed line 31 in Store::DBI from: my $sth = $self->dbh->table_info( '', '', $table, "TABLE" ); my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); and it stops complaining.
On Sat Nov 09 10:22:52 2019, JROBINSON wrote: Show quoted text
> Bot::BasicBot::Pluggable::Module::SimpleBlog has a bunch of fails, > because it is loading Store::DBI in its tests.. > > Looks like the Pluggable tests don't directly test Store loading for > DBI, if I add this to 03store.t: > > isa_ok( > Bot::BasicBot::Pluggable::Store->new("DBI"), > 'Bot::BasicBot::Pluggable::Store::DBI' > ); > isa_ok( Bot::BasicBot::Pluggable::Store->new( { type => "DBI" } ), > 'Bot::BasicBot::Pluggable::Store::DBI' ); > > I get these errors: > DBD::SQLite::db do failed: table "basicbot" already exists at > /usr/src/perl/Bot-BasicBot-Pluggable- > 1.20/lib/Bot/BasicBot/Pluggable/Store/DBI.pm line 36. > ok 4 - An object of class 'Bot::BasicBot::Pluggable::Store::DBI' isa > 'Bot::BasicBot::Pluggable::Store::DBI' > DBD::SQLite::db do failed: table "basicbot" already exists at > /usr/src/perl/Bot-BasicBot-Pluggable- > 1.20/lib/Bot/BasicBot/Pluggable/Store/DBI.pm line 36. > (tho it doesnt actually fail, grrr) > > Anyway it looks like DBD::SQLite's syntax for table_info changed at > some point.. I changed line 31 in Store::DBI from: > > my $sth = $self->dbh->table_info( '', '', $table, "TABLE" ); > > my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); > > and it stops complaining.
My mistake, this isnt why SimpleBlog is failing.. its just warning and fouling up the output .. ;) please fix anyway..
On 2019-11-09 15:22:52, JROBINSON wrote: [...] Show quoted text
> I get these errors: > DBD::SQLite::db do failed: table "basicbot" already exists at [...]
Show quoted text
> Anyway it looks like DBD::SQLite's syntax for table_info changed at > some point.. I changed line 31 in Store::DBI from: > > my $sth = $self->dbh->table_info( '', '', $table, "TABLE" ); > > my $sth = $self->dbh->table_info( '%', '%', $table, "TABLE" ); > > and it stops complaining.
Ah, yes, this sounded familiar, so I went checking, and I made exactly that change in https://github.com/bigpresh/bot-basicbot-pluggable/pull/11/files prompted by #75849, but never got as far as testing/merging/releasing it. I must find some more time for CPAN code, but it's been a hectic few months. Thanks for the report!