X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI.pm;h=415878188cccbb2e135038c04e183cdbf810ff03;hb=093fc7a6ef41c585afecfbc3ed18e300e65a1cd5;hp=9077631949a9ee440af4e961cd3869d671c2b88e;hpb=955f159099804674de35818a97a96a1a2d4ffb68;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index 9077631..4158781 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -275,7 +275,9 @@ This class represents the connection to the database =cut sub new { - my $new = bless({}, ref $_[0] || $_[0]); + my $new = {}; + bless $new, (ref $_[0] || $_[0]); + $new->cursor("DBIx::Class::Storage::DBI::Cursor"); $new->transaction_depth(0); @@ -859,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}; @@ -876,7 +873,7 @@ sub columns_info_for { $result{$col_name} = \%column_info; } }; - return \%result if !$@; + return \%result if !$@ && scalar keys %result; } my %result;