to be treated as Moose classes/roles. Supported so far:
- Some level of attributes and methods for both classes and roles
- Required methods in roles
+ - Method modifiers in roles (they're already applied in classes)
0.009014 - 2012-03-29
- Split Role::Tiny out into its own dist
}
}
if ($am_role) {
- $meta->add_required_methods(@{$Moo::Role::INFO{$name}{requires}});
+ my $info = $Moo::Role::INFO{$name};
+ $meta->add_required_methods(@{$info->{requires}});
+ foreach my $modifier (@{$info->{modifiers}}) {
+ my ($type, @args) = @$modifier;
+ $meta->${\"add_${type}_method_modifier"}(@args);
+ }
} else {
foreach my $attr (@attrs) {
foreach my $method (@{$attr->associated_methods}) {