On Tue, Mar 04, 2003 at 06:14:24PM +0100, Mattia Barbon wrote:
On Mon, 3 Mar 2003 22:58:12 -0500 Ilya Goldberg <[EMAIL PROTECTED]> wrote:
To answer my own question, the problem was a bug (feature?) in how 'DIR' is processed.
I think it is a (minor) bug.
Yes, its a known bug. MakeMaker doesn't really recurse into sub-directories properly. It only goes down one at a time. Its in the TODO list but I
won't be bothering to fix it. If someone wants to take a whack at it, sure.
Another solution is to put a Makefile.PL in each directory between the root and the directory with the other Makefile.PLs. Example: if current
This seems to be the universal work-around.
I use the following solution. I want to reach modperl-2.0/docs/api/mod_perl-2.0/Makefile.PL from modperl-2.0/Makefile.PL, so the code goes:
my @remote_makefile_dirs = qw(docs/api/mod_perl-2.0);
WriteMakefile(
DIR => get_dirs_with_makefile(@remote_makefile_dirs),
...
);sub get_dirs_with_makefile {
my @remove_makefile_dirs = @_;
my %mf_dirs = (); # since we cannot override MM::init_dirscan, but at the same time
# want to change $self->{DIR}, we have to reproduce
# MM::init_dirscan's section on setting DIR
for my $dir (@remote_makefile_dirs,
grep {-d} DirHandle->new(curdir())->read) {
next if curdir() eq $dir || updir() eq $dir;
next if -l $dir; # no symlinks per MakeMaker
$mf_dirs{$dir}++ if -f catfile($dir, "Makefile.PL");
}
return [sort keys %mf_dirs];
}__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
