On Thu, Jun 06, 2002 at 02:58:21PM -0700, David Carmean wrote: > The application is a single executable (script) named 'ddnstool'. > It also uses three modules as class libraries. To keep things straight > the modules live a couple of levels down in an internal company namespace. > I've used h2xs to generate module skeletons. So a MANIFEST *exerpt* might > look something like this: > > MANIFEST > Makefile.PL > bin/ddnstool > FOO/DDNS/Exceptions/Makefile.PL > FOO/DDNS/Exceptions/Exceptions.pm > FOO/DDNS/Graph/Makefile.PL > FOO/DDNS/Graph/Graph.pm > FOO/DDNS/Zonemaster/Makefile.PL > FOO/DDNS/Zonemaster/Zonemaster.pm > > > My goal is to get everything tied together and in the top-level > ..../blib so that I can develop and test subsets then the full app. > > The only way I've figured out to do this is to create fake > packages at the two intervening directory levels: > > FOO/FOO.pm > FOO/DDNS/DDNS.pm
MakeMaker will only recurse one subdirectory deep, so it won't make the jump from ./Makefile.PL to FOO/DDNS/Exceptions/Makefile.PL on it's own. Whether or not this is the right thing, I dunno, but the work around is to simply place a Makefile.PL in each intervening subdirectory (so one in FOO/ and one in FOO/DDNS/) which calls ExtUtils::MakeMaker::WriteEmptyMakefile(). That way, there will be a Makefile in each subdirectory it has to walk down through. > I tried WriteMakefile( DIR => [ 'FOO/DDNS/Exceptions', 'FOO/DDNS/Graph', > 'FOO/DDNS/Zonemaster', ], > .... > ) > ....and removed FOO/Makefile.PL and FOO/DDNS/Makefile.PL, but then I end up > with two separate blib trees: a $(TOP_LEVEL)/blib and a > $(TOP_LEVEL)/FOO/DDNS/blib. > > Is there a reason the DIR attribute does not also cause the > appropriate '../../...' prepend magic to happen? I think in > this particular case it *might* be possible to hack (ugly) > MM->pasthru, but only because all three of the modules are at the > same depth in the directory tree. This exact problem came up before, but I can't remember where. I believe the above WriteEmptyMakefile() trick will work around it. -- This sig file temporarily out of order.
