Don't use $_ as loop variable when calling arbitrary code (RT#81072)
[gitmo/Moo.git] / xt / moose-method-modifiers.t
index 89c9891..2d49a8b 100644 (file)
@@ -4,7 +4,7 @@ use Test::More;
 use Moo::HandleMoose;
 
 {
-   package FooAttr;
+   package ModifyFoo;
    use Moo::Role;
 
    our $before_ran = 0;
@@ -16,12 +16,12 @@ use Moo::HandleMoose;
    around foo => sub {
       my ($orig, $self, @rest) = @_;
       $self->$orig(@rest);
-      $after_ran = 1;
+      $around_ran = 1;
    };
 
    package Bar;
    use Moose;
-   with 'FooAttr';
+   with 'ModifyFoo';
 
    sub foo { }
 }