Commits

Toby Inkster  committed 3c91909 Merge

Merge pull request #1 from drebolo/master

fix for Bug #86828

  • Participants
  • Parent commits 61f04fe, 0acf8e5

Comments (0)

Files changed (1)

File lib/MooX/CaptainHook.pm

 	require Role::Tiny;
 	return !!1 if exists $Role::Tiny::INFO{$package};
 	return !!0 if exists $Moo::MAKERS{$package};
-	if ($INC{'Class/MOP.pm'} and my $classof = 'Class::MOP'->can('class_of')) {
+	if ($INC{'Class/MOP.pm'} and my $classof = 'Class::MOP'->can('class_of') and 'Class::MOP'->can('class_of')->($package)) {
 		return !!1 if $classof->($package)->isa('Moose::Meta::Role');
 	}
 	return !!0;