Introduce the describe_class_methods() utility function
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / MethodAttributes.pm
index cea3961..1b50ac9 100644 (file)
@@ -76,6 +76,16 @@ sub MODIFY_CODE_ATTRIBUTES {
     weaken( $attr_cref_registry->{$code}{weakref} = $code )
   }
 
+
+  # increment the pkg gen, this ensures the sanity checkers will re-evaluate
+  # this class when/if the time comes
+  mro::method_changed_in($class) if (
+    ! DBIx::Class::_ENV_::OLD_MRO
+      and
+    ( $attrs->{dbic} or $attrs->{misc} )
+  );
+
+
   # handle legacy attrs
   if( $attrs->{misc} ) {
 
@@ -94,6 +104,7 @@ sub MODIFY_CODE_ATTRIBUTES {
     ))];
   }
 
+
   # handle DBIC_* attrs
   if( $attrs->{dbic} ) {
     my $slot = $attr_cref_registry->{$code};
@@ -108,6 +119,7 @@ sub MODIFY_CODE_ATTRIBUTES {
     ];
   }
 
+
   # FIXME - DBIC essentially gobbles up any attribute it can lay its hands on:
   # decidedly not cool
   #