Commits

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

avoided having two _set_obj() methds.

  • Participants
  • Parent commits 9d4e702

Comments (0)

Files changed (2)

     every iteration, in case it doesn't exist. Instead, the default_actions
     is calculated according to its existence when the tree traverser
     is initialized.
+    - Refactoring/Optimization: avoided having two _set_obj() methds by
+    calling _set_obj() from _run_cb().
     
 0.1.9 - Tue Feb 10 16:54:00 IST 2009
     - Added use integer to the modules, because they don't make use

File lib/File/Find/Object.pm

 
     my @calc_obj =
         $self->callback()
-        ? (qw(_set_obj_skip _run_cb))
+        ? (qw(_run_cb))
         : (qw(_set_obj))
         ;
 
     return 1;
 }
 
-sub _set_obj_skip {
+sub _run_cb {
     my $self = shift;
 
-    $self->item_obj($self->_calc_current_item_obj());
-
-    return "SKIP";
-}
-
-sub _run_cb {
-    my $self = shift;
+    $self->_set_obj();
 
     $self->callback()->($self->_curr_path());