Allow broken resultsource-class-derived objects to still work
Peter Rabbitson [Tue, 30 Jun 2009 10:39:06 +0000 (10:39 +0000)]
lib/DBIx/Class/Row.pm

index 72bb2fc..554023b 100644 (file)
@@ -800,7 +800,7 @@ sub set_column {
     my $colinfo = $self->column_info ($column);
 
     # cache for speed
-    if (not defined $colinfo->{is_numeric}) {
+    if (not defined $colinfo->{is_numeric} && $self->_source_handle) {
       $colinfo->{is_numeric} =
         $self->result_source->schema->storage->is_datatype_numeric ($colinfo->{data_type})
           ? 1