}
}
-sub role {
+sub role (&) {
my $caller = shift;
my $role_generator = shift;
Class::MOP::Class->initialize($caller)->role_generator($role_generator);
);
}
-# give role a (&) prototype
-moose_around _make_wrapper => sub {
- my $orig = shift;
- my ($self, $caller, $sub, $fq_name) = @_;
-
- if ($fq_name =~ /::role$/) {
- return sub (&) { $sub->($caller, @_) };
- }
-
- return $orig->(@_);
-};
-
sub has {
my $caller = shift;
my $meta = $CURRENT_METACLASS || Class::MOP::Class->initialize($caller);