Moved even more code up to Native/Writer
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / Trait.pm
index 2a77fca..6727e33 100644 (file)
@@ -92,6 +92,7 @@ around '_make_delegation_method' => sub {
             package_name      => $self->associated_class->name,
             attribute         => $self,
             curried_arguments => \@curried_args,
+            root_types        => [ $self->_root_types ],
         );
     }
     # XXX - bridge code
@@ -115,6 +116,10 @@ around '_make_delegation_method' => sub {
     }
 };
 
+sub _root_types {
+    return $_[0]->_helper_type;
+}
+
 sub _native_accessor_class_for {
     my ( $self, $suffix ) = @_;