use Scalar::Util 'blessed';
-our $VERSION = '0.59';
+our $VERSION = '0.67';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub apply_methods {
my ($self, $role1, $role2) = @_;
foreach my $method_name ($role1->get_method_list) {
-
- next if $self->is_method_excluded($method_name);
if ($self->is_method_aliased($method_name)) {
my $aliased_method_name = $self->get_method_aliases->{$method_name};
);
if (!$role2->has_method($method_name)) {
- $role2->add_required_methods($method_name);
+ $role2->add_required_methods($method_name)
+ unless $self->is_method_excluded($method_name);
}
next;
- }
+ }
+
+ next if $self->is_method_excluded($method_name);
# it if it has one already
if ($role2->has_method($method_name) &&
$role2->add_required_methods($method_name);
}
else {
- # add it, although it could be overriden
+ # add it, although it could be overridden
$role2->add_method(
$method_name,
$role1->get_method($method_name)
if ($role2->has_method($method_name)) {
# if it is being composed into another role
# we have a conflict here, because you cannot
- # combine an overriden method with a locally
+ # combine an overridden method with a locally
# defined one
Moose->throw_error("Role '" . $role1->name . "' has encountered an 'override' method conflict " .
"during composition (A local method of the same name as been found). This " .
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2008 by Infinity Interactive, Inc.
+Copyright 2006-2009 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>