I found that there is no simple way to tell M::P::O to avoid looking in
.svn dirs at all (especially when they are unreadable for uid executing
code)
i done such override for myself
sub Module::Pluggable::Object::find_files {
my $self = shift;
my $search_path = shift;
my $file_regex = $self->{'file_regex'} || qr/\.pm$/;
# find all the .pm files in it
# this isn't perfect and won't find multiple plugins per file
#my $cwd = Cwd::getcwd;
my @files = ();
{ # for the benefit of perl 5.6.1's Find, localize topic
local $_;
File::Find::find( { no_chdir => 1,
wanted => sub {
# Inlined from File::Find::Rule C< name =>
'*.pm' >
return unless $File::Find::name =~
/$file_regex/;
(my $path = $File::Find::name) =~ s#^\\./##;
push @files, $path;
},
preprocess => sub {
return grep !/\.svn/, @_;
},
}, $search_path );
}
#chdir $cwd;
return @files;
}
which fixed problem for me (besides complain about redefined sub).