aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/Role.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-03-04 13:31:34 -0600
committerJesse Luehrs <doy@tozt.net>2011-03-04 13:31:34 -0600
commit9be81e194a68c4d49215701c65da3c5a264c6384 (patch)
treecbf4c3b967e1f948fc4e997362c5a7d7dea03856 /lib/Reaction/Role.pm
parent7e8cc0731f15f8c4b12f4a8f9d2da23d077c9b9c (diff)
downloadreaction-9be81e194a68c4d49215701c65da3c5a264c6384.tar.gz
reaction-9be81e194a68c4d49215701c65da3c5a264c6384.zip
fixes for the applied_attribute stuff in moose 2
Diffstat (limited to 'lib/Reaction/Role.pm')
-rw-r--r--lib/Reaction/Role.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Reaction/Role.pm b/lib/Reaction/Role.pm
index 7da166f..c2f16f4 100644
--- a/lib/Reaction/Role.pm
+++ b/lib/Reaction/Role.pm
@@ -25,6 +25,15 @@ override add_method_to_target => sub {
my ($self, $target, $method) = @_;
$target->meta->add_method(@$method);
};
+override next_import => sub {
+ my ($self) = @_;
+ my $import = super;
+ # ugh
+ return sub {
+ push @_, '-metaclass' => 'Reaction::Meta::Role';
+ goto $import;
+ };
+};
sub do_role_sub {
my ($self, $package, $role, $which, $setup) = @_;
confess "Invalid role declaration, should be: role Role which { ... }"