Commits

Anonymous committed a1bc2eb

Extracted the _component_open_dir method.

  • Participants
  • Parent commits de853ce

Comments (0)

Files changed (2)

lib/File/Find/Object.pm

 sub _open_dir {
     my $self = shift;
 
-    my $current = $self->_current();
-
-    if (!$current->_should_scan_dir())
-    {
-        return $current->_open_dir_ret();
-    }
-
-    return $current->_set_up_dir(
-        $current->_calc_dir_files(),
-    );
+    return $self->_current()->_component_open_dir();
 }
 
 sub set_traverse_to

lib/File/Find/Object/Base.pm

     return \@files;
 }
 
+sub _component_open_dir
+{
+    my $self = shift;
+
+    if (!$self->_should_scan_dir())
+    {
+        return $self->_open_dir_ret();
+    }
+
+    return $self->_set_up_dir(
+        $self->_calc_dir_files(),
+    );
+}
+
 1;
 
 =head1 NAME