X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI.pm;h=7cb0c66ce4b3d3801a0324df51d6ef662f48f9d6;hb=db9c411a5cd66e84a2c1c2446a26aecd92150531;hp=c7539eccaafda86809956f3f0a97f595547201ac;hpb=e32d24a573a22dab2c70f241f7390944209ca6b3;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 c7539ec..7cb0c66 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -285,12 +285,7 @@ sub _columns_info_for { if ($dbh->can('column_info')) { my %result; eval { - 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, '%' ); - }; + my $sth = $self->_dbh_column_info($dbh, undef, $self->db_schema, $table, '%' ); while ( my $info = $sth->fetchrow_hashref() ){ my $column_info = {}; $column_info->{data_type} = lc $info->{TYPE_NAME}; @@ -367,10 +362,16 @@ sub _columns_info_for { return \%result; } -# Override this in vendor class to return any additional column -# attributes +# do not use this, override _columns_info_for instead sub _extra_column_info {} +# override to mask warnings if needed (see mysql) +sub _dbh_column_info { + my ($self, $dbh) = (shift, shift); + + return $dbh->column_info(@_); +} + =head1 SEE ALSO L