Commits

Anonymous committed 37db517

Converted ::Result->is_dir() to use -d _

  • Participants
  • Parent commits 12e5f3e

Comments (0)

Files changed (3)

     eliminated a similar symptom to this one:
         - http://en.wikipedia.org/wiki/Schlemiel_the_painter%27s_Algorithm
     - Added the ->is_file() method to ::Result.
+    - Converted ::Result->is_dir() to use -d _ 
 
 0.2.0 - Sun Feb 22 11:52:06 IST 2009
     - Optimization: now not checking for the existence of the callback() after 

File lib/File/Find/Object.pm

         base => shift(@comps),
         stat_ret => scalar($self->_top_stat_copy()),
         is_file => scalar(-f _),
+        is_dir => scalar(-d _),
     };
 
     if ($self->_curr_not_a_dir())

File lib/File/Find/Object/Result.pm

         (map { $_ => $_ } (qw(
         base
         basename
+        is_dir
         is_file
         path
         dir_components
     return $self;
 }
 
-sub is_dir
-{
-    return S_ISDIR(shift->stat_ret->[2]);
-}
-
 sub full_components
 {
     my $self = shift;