http://qs321.pair.com?node_id=550487

matthewb has asked for the wisdom of the Perl Monks concerning the following question:

O wise monks.

I am trying to retrofit a test suite on an existing application the directories of which have been laid out in a nonstandard way. I am unable to change the following conditions:

  1. Directory structure must stay as it is
  2. Have to use ExtUtils::MakeMaker

The difficulty that I am having is in advising make test to look for module files in a location other than blib/lib/

I am aware that I could put a use lib ... line at the top of every test and also that, alternatively I could specify a PM => {} mapping in the Makefile.PL to copy libraries to another location. Both of these solutions seem messy to me and possibly troublesome to maintain in the longer term.

Looking through the docs for ExtUtils::MakeMaker I am interested to note the PMLIBDIRS option that tells it (EUMM) where to look for nonstandard modules. However, when using this solution, make reproduces the whole path under blib/, again stopping make test from doing its thing.

I'm pretty sure I've explored the possibilities available to me but wonder if any of the whizz-kids know of a clean and simple solution to my troubles?

Any advice greatly appreciated,

Update: note that I am not asking how to tell Perl to look in a directory other than those usually found in @INC here,

MB