From: Rafael Kitover Date: Thu, 4 Feb 2010 16:24:51 +0000 (+0000) Subject: Firebird: fix test cleanup, add ODBC wrapper X-Git-Tag: v0.08121~73^2~45 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dff4c3a37fb89cd0d4ba5d03859a86c1570851d1;p=dbsrgits%2FDBIx-Class.git Firebird: fix test cleanup, add ODBC wrapper --- diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm new file mode 100644 index 0000000..adfc559 --- /dev/null +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm @@ -0,0 +1,28 @@ +package DBIx::Class::Storage::DBI::ODBC::Firebird; + +use strict; +use warnings; +use base qw/DBIx::Class::Storage::DBI::InterBase/; +use mro 'c3'; + +1; + +=head1 NAME + +DBIx::Class::Storage::DBI::ODBC::Firebird - Driver for using the Firebird RDBMS +through ODBC + +=head1 SYNOPSIS + +All functionality is provided by L, see +that module for details. + +=head1 AUTHOR + +See L and L. + +=head1 LICENSE + +You may distribute this code under the same terms as Perl itself. + +=cut diff --git a/t/750firebird.t b/t/750firebird.t index 1e1f72b..44efe7c 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -5,6 +5,7 @@ use Test::More; use Test::Exception; use lib qw(t/lib); use DBICTest; +use Scope::Guard (); # tests stolen from 749sybase_asa.t @@ -34,8 +35,9 @@ foreach my $info (@info) { push @handles_to_clean, $dbh; - eval { $dbh->do("DROP TABLE artist") }; + my $sg = Scope::Guard->new(\&cleanup); + eval { $dbh->do("DROP TABLE artist") }; $dbh->do(<do("DROP GENERATOR gen_artist_artistid") }; $dbh->do('CREATE GENERATOR gen_artist_artistid'); + eval { $dbh->do("DROP TRIGGER artist_bi") }; $dbh->do(<do("DROP TABLE $_") } for qw/artist bindtype_test/; + eval { $dbh->do('DROP TRIGGER artist_bi') }; + diag $@ if $@; + eval { $dbh->do('DROP GENERATOR gen_artist_artistid') }; + diag $@ if $@; + foreach my $table (qw/artist bindtype_test/) { + $dbh->do("DROP TABLE $table"); + diag $@ if $@; + } } }