Commits

shl...@6f433eb9-a002-0410-945b-ee5462c261ee  committed 0c1f078

Changed a $_-loop to an explicit $action-loop.

  • Participants
  • Parent commits 0d17861

Comments (0)

Files changed (1)

File lib/File/Find/Object.pm

     $self->isdot($current) and return 0;
     $self->_filter_wrapper($current) or return 0;  
 
-    foreach ($self->depth() ? qw/b a/ : qw/a b/) {
-        if ($current->_action->{$_}) {
+    foreach my $action ($self->depth() ? qw/b a/ : qw/a b/)
+    {
+        if ($current->_action->{$action}) {
             next;
         }
-        $current->_action->{$_} = 1;
-        if($_ eq 'a') {
+        $current->_action->{$action} = 1;
+        if($action eq 'a') {
             if ($self->callback()) {
                 $self->callback()->($self->current_path($current));
             }
             return 1;
         }
             
-        if ($_ eq 'b') {
+        if ($action eq 'b') {
             $self->check_subdir($current) or next;
             push @{$self->_dir_stack()}, 
                 File::Find::Object::PathComponent->new(