Commits

Anonymous committed 9f85b21

Removed _father() and optimized _current_father().

Comments (0)

Files changed (2)

+
+    - Optimization/Refactoring: replaced the last call to ->_father with a 
+    call to _current_father(). Removed ->_father and optimized
+    _current_father() .
+
 0.1.7 - Thu Jan 15 16:09:49 IST 2009
     - Fixed the check-for-link and for directory semantics on Windows
     and other systems. Converted to "perldoc -f lstat" instead of 

lib/File/Find/Object.pm

     my ($self, $top) = @_;
 
     if (defined($self->_curr_file(
-            $top->_father($self)->_next_traverse_to()
+            $top->_current_father()->_next_traverse_to()
        )))
     {
         $top->_curr_comps()->[-1] = $self->_curr_file();
     return $self->item_obj() ? $self->item_obj()->path() : undef;
 }
 
+=begin Removed
+
+This function is no longer used.
+
 sub _father
 {
     my ($self, $level) = @_;
     }
 }
 
+=end Removed
+
+=cut
+
 sub _current_father {
-    my $self = shift;
-
-    return $self->_father($self->_current);
+    return shift->_dir_stack->[-2];
 }
 
 sub _increment_target_index