bless \%args, $class;
}
+sub get_roles { $_[0]->{roles} }
+
+
sub add_required_methods {
my $self = shift;
my @methods = @_;
push @{ $self->{$modifier}->{$method_name} ||= [] }, $method;
return;
};
+ my $has_method_modifiers = sub{
+ my($self, $method_name) = @_;
+ my $m = $self->{$modifier}->{$method_name};
+ return $m && @{$m} != 0;
+ };
my $get_method_modifiers = sub {
my ($self, $method_name) = @_;
return @{ $self->{$modifier}->{$method_name} ||= [] }
no strict 'refs';
*{ 'add_' . $modifier_type . '_method_modifier' } = $add_method_modifier;
+ *{ 'has_' . $modifier_type . '_method_modifiers' } = $has_method_modifiers;
*{ 'get_' . $modifier_type . '_method_modifiers' } = $get_method_modifiers;
}
-sub get_roles { $_[0]->{roles} }
-
# This is currently not passing all the Moose tests.
sub does_role {
my ($self, $role_name) = @_;