Commits

Toby Inkster committed 0e32d24 Merge

fix from drebolo

  • Participants
  • Parent commits 3aa9cdf, 3c91909

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;