use sub::name to fix compat with moose method modifiers
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / Relationship.pm
index 55fff10..880ffc2 100644 (file)
@@ -3,7 +3,7 @@ package
 
 use strict;
 use warnings;
-
+use Sub::Name ();
 
 =head1 NAME
 
@@ -36,7 +36,7 @@ for my $method (keys %method2key) {
     };
     
     no strict 'refs';
-    *{$method} = $code;
+    *{$method} = Sub::Name::subname $method, $code;
 }
 
 1;