Commits

Anonymous committed 3ed1e0a

Converted filter to a $top->filter($current) method.

  • Participants
  • Parent commits d2d1160

Comments (0)

Files changed (1)

lib/File/Find/Object.pm

     $self->{currentfile} or return 0;
 
     $self->isdot and return 0;
-    $self->filter or return 0;  
+    $self->_top->filter($self) or return 0;  
 
     foreach ($self->_top->{depth} ? qw/b a/ : qw/a b/) {
         if ($self->{_action}{$_}) {
 }
 
 sub filter {
-    my ($self) = @_;
-    return defined($self->_top->{filter}) ?
-        $self->_top->{filter}->($self->_top->current_path($self)) :
+    my ($self, $current) = @_;
+    return defined($self->{filter}) ?
+        $self->{filter}->($self->current_path($current)) :
         1;
 }