Re: help with subdirs

2003-03-06 Thread schwern
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.



Re: 'make dist' now adds META.yml

2003-03-06 Thread Ken Williams
On Thursday, March 6, 2003, at 08:38  AM, [EMAIL PROTECTED] wrote:
The META.yml file is intented to be compatible with Module::Build's and
currently looks something like this:
#XXX This is a prototype!!!  It will change in the future!!! X#
name: ExtUtils-MakeMaker
version:  6.06_03
version_from: lib/ExtUtils/MakeMaker.pm
installdirs:  perl
requires:
File::Spec:0.8
File::Basename:0
DirHandle: 0
Pod::Man:  0
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.06_03
The only thing that sticks out at me is the installdirs key - is that 
really meta-data about the distribution?  It seems like it's a choice 
the user makes when installing.

Also, there's no license key here.  Is it possible to generate that 
from anything?

 -Ken



Re: 'make dist' now adds META.yml

2003-03-06 Thread schwern
On Thu, Mar 06, 2003 at 09:00:06AM -0600, Ken Williams wrote:
 The only thing that sticks out at me is the installdirs key - is that 
 really meta-data about the distribution?  It seems like it's a choice 
 the user makes when installing.

If installdirs: perl then its a core module.  Site means its not.
The user can change it from there if they like, but there is a default
installation choice made by the author.

Just tossed it in there because it was easy.


 Also, there's no license key here.  Is it possible to generate that 
 from anything?

MakeMaker doesn't have any license information. :(


Re: help with subdirs

2003-03-06 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
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 BekmanJAm_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