File::Find::Rule->directory->in( $directory ); # rather than File::Find::Rule->new->directory->in( $directory );