use Scalar::Util 'blessed';
-our $VERSION = '0.57';
+our $VERSION = '0.62_01';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
my ($self, $role, $class) = @_;
foreach my $method_name ($role->get_method_list) {
- next if $self->is_method_excluded($method_name);
-
- # it if it has one already
- if ($class->has_method($method_name) &&
- # and if they are not the same thing ...
- $class->get_method($method_name)->body != $role->get_method($method_name)->body) {
- next;
- }
- else {
- # add it, although it could be overriden
- $class->add_method(
- $method_name,
- $role->get_method($method_name)
- );
+ unless ($self->is_method_excluded($method_name)) {
+ # it if it has one already
+ if ($class->has_method($method_name) &&
+ # and if they are not the same thing ...
+ $class->get_method($method_name)->body != $role->get_method($method_name)->body) {
+ next;
+ }
+ else {
+ # add it, although it could be overriden
+ $class->add_method(
+ $method_name,
+ $role->get_method($method_name)
+ );
+ }
}
if ($self->is_method_aliased($method_name)) {