1. Toby Inkster
  2. p5-moox-classattribute

Commits

Toby Inkster  committed 0e32d24 Merge

fix from drebolo

  • Participants
  • Parent commits 3aa9cdf, 3c91909
  • Branches default

Comments (0)

Files changed (1)

File lib/MooX/CaptainHook.pm

View file
  • Ignore whitespace
 	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;