From: Shawn M Moore Date: Sun, 3 May 2009 16:52:48 +0000 (-0400) Subject: ClassOverridesRole applies only to Moose::Meta::Class X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=425e287ea19cc3de8e88ebf5749020fa6770913b;p=gitmo%2FPerl-Critic-Dynamic-Moose.git ClassOverridesRole applies only to Moose::Meta::Class --- diff --git a/lib/Perl/Critic/Policy/DynamicMoose/ClassOverridesRole.pm b/lib/Perl/Critic/Policy/DynamicMoose/ClassOverridesRole.pm index 361b55f..b373f84 100644 --- a/lib/Perl/Critic/Policy/DynamicMoose/ClassOverridesRole.pm +++ b/lib/Perl/Critic/Policy/DynamicMoose/ClassOverridesRole.pm @@ -7,6 +7,9 @@ use Perl::Critic::Utils ':severities'; Readonly::Scalar my $EXPL => q{}; sub default_severity { $SEVERITY_MEDIUM } +# Class::MOP::Class has no roles +sub applies_to_metaclass { 'Moose::Meta::Class' } + sub violates_metaclass { my $self = shift; my $meta = shift;