From: Rafael Kitover Date: Fri, 26 Mar 2010 23:19:56 +0000 (+0000) Subject: move warning suppression into ::DBI::InterBase X-Git-Tag: v0.08121~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f0a1e0782630d46ecee17e04dbe2ab9d6525f61;p=dbsrgits%2FDBIx-Class.git move warning suppression into ::DBI::InterBase --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ed5444b..a7abffb 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -940,7 +940,6 @@ sub _populate_server_info { my $dbms_ver = eval { local $@; - local $SIG{__WARN__} = sub {}; $self->_get_dbh->get_info(18) }; diff --git a/lib/DBIx/Class/Storage/DBI/InterBase.pm b/lib/DBIx/Class/Storage/DBI/InterBase.pm index 3664d9c..1abddf1 100644 --- a/lib/DBIx/Class/Storage/DBI/InterBase.pm +++ b/lib/DBIx/Class/Storage/DBI/InterBase.pm @@ -155,6 +155,14 @@ sub _set_sql_dialect { } } +sub _populate_server_info { + my $self = shift; + + local $SIG{__WARN__} = sub {}; # silence warning due to bug in DBD::InterBase + + return $self->next::method(@_); +} + =head2 connect_call_use_softcommit Used as: diff --git a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm index 6f6acdf..2b91058 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm @@ -38,6 +38,10 @@ sub _set_sql_dialect { 1 } # releasing savepoints doesn't work, but that shouldn't matter sub _svp_release { 1 } +sub _populate_server_info { + goto &DBIx::Class::Storage::DBI::_populate_server_info +} + sub datetime_parser_type { 'DBIx::Class::Storage::DBI::ODBC::Firebird::DateTime::Format' }