From: Brandon L. Black Date: Tue, 8 Aug 2006 05:59:05 +0000 (+0000) Subject: using ->rows here was not a reliable thing to do X-Git-Tag: v0.07002~50 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=093fc7a6ef41c585afecfbc3ed18e300e65a1cd5;p=dbsrgits%2FDBIx-Class.git using ->rows here was not a reliable thing to do --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 5984c94..4158781 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -861,11 +861,6 @@ sub columns_info_for { my $sth = $dbh->column_info( undef,$schema, $tab, '%' ); $sth->execute(); - # Some error occured or there is no information: - if($sth->rows <1) { - die "column_info returned no rows for $schema, $tab"; - } - while ( my $info = $sth->fetchrow_hashref() ){ my %column_info; $column_info{data_type} = $info->{TYPE_NAME}; @@ -878,7 +873,7 @@ sub columns_info_for { $result{$col_name} = \%column_info; } }; - return \%result if !$@; + return \%result if !$@ && scalar keys %result; } my %result;