X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI.pm;h=b3c9b4aea50db4d8474a18bddc4575bc97313eff;hb=c38ec663ec7b40c65613e5ec26542672b15cdbde;hp=19d20faf12a0d8cbc0a5463c633c4074fec3b30e;hpb=53e721bce0ce6df2b721c52ec331a8098e55b533;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index 19d20fa..b3c9b4a 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -285,7 +285,12 @@ sub _columns_info_for { if ($dbh->can('column_info')) { my %result; eval { - my $sth = eval { local $SIG{__WARN__} = sub {}; $dbh->column_info( undef, $self->db_schema, $table, '%' ); }; + my $sth = do { + # FIXME - seems to only warn on MySQL, and even then the output is valuable + # need to figure out how no to mask it away (and still have tests pass) + local $SIG{__WARN__} = sub {}; + $dbh->column_info( undef, $self->db_schema, $table, '%' ); + }; while ( my $info = $sth->fetchrow_hashref() ){ my $column_info = {}; $column_info->{data_type} = lc $info->{TYPE_NAME}; @@ -313,7 +318,8 @@ sub _columns_info_for { } $sth->finish; }; - return \%result if !$@ && scalar keys %result; + + return \%result if !$@ && scalar keys %result; } my %result;