1 package Module::Install::Admin::Find;
5 use Module::Install::Base ();
6 use vars qw{$VERSION @ISA};
9 @ISA = qw(Module::Install::Base);
14 $self->_top->find_extensions(@_);
18 my ($self, $pkg) = @_;
20 unless ($pkg =~ /\.pm$/) {
26 foreach my $inc (@INC) {
27 next if $inc eq $self->_top->{prefix} or ref($inc);
28 push @found, "$inc/$pkg" if -f "$inc/$pkg";
31 wantarray ? @found : $found[0];
35 my ($self, $pkg) = @_;
37 unless ($pkg =~ /\.pm$/) {
43 foreach my $inc (@INC) {
44 next if $inc eq $self->_top->{prefix} or ref($inc);
51 }, $_ ] for grep -e, glob("$inc/$pkg");
54 wantarray ? @found : $found[0];
58 my ($self, $file, $path) = @_;
59 $path = '' if not defined $path;
60 $file = "$path/$file" if length($path);
67 opendir(DIR, $file) or die "Can't opendir $file";
68 while (my $new_file = readdir(DIR)) {
69 next if $new_file =~ /^(\.|\.\.)$/;
70 push @files, $self->find_files($new_file, $file);