X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FMethodAttributes.pm;h=1b50ac9f4a16682cc36ba4c8eb5ee733588cc6a8;hb=296248c3;hp=cea396116cccedd3a802318e6adf7f4b37a9e22e;hpb=5ab7259324b6e3d0feea533239b6d77db0b28c9c;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/MethodAttributes.pm b/lib/DBIx/Class/MethodAttributes.pm index cea3961..1b50ac9 100644 --- a/lib/DBIx/Class/MethodAttributes.pm +++ b/lib/DBIx/Class/MethodAttributes.pm @@ -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 #