1. Shlomi Fish
  2. perl-File-Find-Object

Commits

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

Refactoring : top/non_top'ed _me_die.

  • Participants
  • Parent commits f2cb749
  • Branches default

Comments (0)

Files changed (1)

File lib/File/Find/Object.pm

View file
  • Ignore whitespace
     return;
 }
 
-__PACKAGE__->_top_it([qw(_current)]);
+__PACKAGE__->_top_it([qw(_current _me_die)]);
 
 use Carp;
 
     }
 }
 
-sub _me_die {
+sub _top__me_die {
+    return 1;
+}
+
+sub _non_top__me_die {
     my $self = shift;
 
-    # TODO : Refactor this check - it appears several times.
-    if ($self->_is_top())
-    {
-        return 1;
-    }
+    $self->_become_default();
 
-    $self->_become_default();
     return 0;
 }