move warning suppression into ::DBI::InterBase
Rafael Kitover [Fri, 26 Mar 2010 23:19:56 +0000 (23:19 +0000)]
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/InterBase.pm
lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm

index ed5444b..a7abffb 100644 (file)
@@ -940,7 +940,6 @@ sub _populate_server_info {
 
   my $dbms_ver = eval {
       local $@;
-      local $SIG{__WARN__} = sub {};
       $self->_get_dbh->get_info(18)
   };
 
index 3664d9c..1abddf1 100644 (file)
@@ -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:
index 6f6acdf..2b91058 100644 (file)
@@ -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'
 }