- fix bug in ResultSetManager when a class has no subs with attrs
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSetManager.pm
index 8bfe4ed..258cc7c 100644 (file)
@@ -22,6 +22,8 @@ sub load_resultset_components {
 
 sub _register_attributes {
     my $self = shift;
+    return unless $self->can('_attr_cache');
+
     my $cache = $self->_attr_cache;
     foreach my $meth (@{Class::Inspector->methods($self) || []}) {
         my $attrs = $cache->{$self->can($meth)};