Skip to content
Browse files

isa will suffice instead of DOES here

  • Loading branch information...
1 parent e2772f3 commit 0156586c6ac38e7b909335b8981cba13bd575f44 @rjbs committed
Showing with 5 additions and 3 deletions.
  1. +2 −0 Changes
  2. +3 −3 lib/MooseX/ClassCompositor.pm
View
2 Changes
@@ -1,6 +1,8 @@
Revision history for {{$dist->name}}
{{$NEXT}}
+ replace some ->DOES with ->isa to work on 5.8 without further
+ shenanigans
0.005 2012-10-09 22:42:13 America/New_York
make it possible to pass Moose::Meta::Role objects to ->class_for
View
6 lib/MooseX/ClassCompositor.pm
@@ -227,7 +227,7 @@ sub class_for {
push @roles, $role_object;
$name = $moniker;
- } elsif (blessed $name and $name->DOES('Moose::Meta::Role')) {
+ } elsif (blessed $name and $name->isa('Moose::Meta::Role')) {
confess "this class compositor does not allow role objects"
if $self->forbid_meta_role_objects;
@@ -246,7 +246,7 @@ sub class_for {
my $name = join q{::}, $self->class_basename, @all_names;
for my $r (@{ $self->_fixed_roles }) {
- if (blessed $r and $r->DOES('Moose::Meta::Role')) {
+ if (blessed $r and $r->isa('Moose::Meta::Role')) {
push @roles, $r;
} else {
push @role_class_names, $r;
@@ -290,7 +290,7 @@ sub _memoization_key {
if (ref $arg eq 'ARRAY') {
my ($role_name, $moniker, $params) = @$arg;
push @k, "$moniker : { " . __hash_to_string($params) . " }";
- } elsif (blessed $arg and $arg->DOES('Moose::Meta::Role')) {
+ } elsif (blessed $arg and $arg->isa('Moose::Meta::Role')) {
push @k, $arg->name;
} else {
push @k, $arg;

0 comments on commit 0156586

Please sign in to comment.
Something went wrong with that request. Please try again.