Commits

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

Refactoring: more _current_idx() elimination.

  • Participants
  • Parent commits b9e04b3

Comments (0)

Files changed (1)

File lib/File/Find/Object.pm

 {
     my $self = shift;
 
-    return $self->_dir_stack->[$self->_current_idx];
+    return $self->_dir_stack->[-1];
 }
 
 sub _is_top
 {
     my $self = shift;
 
-    return ($self->_current_idx() < 0);
-}
-
-sub _current_idx
-{
-    my $self = shift;
-
-    return $#{$self->_dir_stack()};
+    return ! @{$self->_dir_stack()};
 }
 
 sub _current_path
     return;
 }
 
-sub _dec_current_idx
-{
-    my $self = shift;
-
-    $self->_current_idx($self->_current_idx()-1);
-
-    return;
-}
-
 sub _calc_actions
 {
     my $self = shift;
     return 1;
 }
 
-sub _inc_current_idx {
-    my $self = shift;
-
-    $self->_current_idx($self->_current_idx()+1);
-
-    return;
-}
-
 sub _process_current_actions
 {
     my $self = shift;