From: Shawn M Moore Date: Sun, 3 May 2009 21:04:04 +0000 (-0400) Subject: s/$meta/$class/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e1c20b9681fd715a5d178111f7ae5606e60e9f3;p=gitmo%2FPerl-Critic-Dynamic-Moose.git s/$meta/$class/ --- diff --git a/lib/Perl/Critic/Policy/DynamicMoose/RequireMethodModifiers.pm b/lib/Perl/Critic/Policy/DynamicMoose/RequireMethodModifiers.pm index 54a6efd..3d94e53 100644 --- a/lib/Perl/Critic/Policy/DynamicMoose/RequireMethodModifiers.pm +++ b/lib/Perl/Critic/Policy/DynamicMoose/RequireMethodModifiers.pm @@ -10,12 +10,12 @@ sub default_severity { $SEVERITY_LOW } sub violates_metaclass { my $self = shift; - my $meta = shift; + my $class = shift; my @violations; - for my $name ($meta->get_method_list) { - my $method = $meta->get_method($name); + for my $name ($class->get_method_list) { + my $method = $class->get_method($name); # override and augment modifiers are always fine. next if $method->isa('Moose::Meta::Method::Overridden') @@ -35,12 +35,12 @@ sub violates_metaclass { # XXX: this freaking sucks next if $name eq 'meta' || $name eq 'BUILD' || $name eq 'DEMOLISH'; - my $next = $meta->find_next_method_by_name($name); + my $next = $class->find_next_method_by_name($name); # Adding new methods is always fine. next if !$next; - push @violations, $self->violation("The '$name' method of class " . $meta->name . " does not use a method modifier to override its superclass implementation.", $EXPL); + push @violations, $self->violation("The '$name' method of class " . $class->name . " does not use a method modifier to override its superclass implementation.", $EXPL); } return @violations;