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

I am trying to package my first module for CPAN distribution. It is pretty simple: just a single module; but there are about 20 test scripts. I am using Module::Build. I have a small file ("test.config") of configuration data that is required for most of my test scripts, and a small module ("TestUtil.pm") that reads this configuration data. Currently these two files are in the "t" directory. However, when I type ./Build test it can't locate TestUtil.pm. What is the proper location for a module whose only purpose is to support the test scripts?

Replies are listed 'Best First'.
Re: Proper location of module required for test scripts
by Corion (Patriarch) on May 03, 2015 at 14:34 UTC

    I usually load such modules by having this line near the top of every test file:

    use lib 't';
      Perfect. Thanks for the quick reply.
Re: Proper location of module required for test scripts
by Your Mother (Archbishop) on May 03, 2015 at 16:28 UTC

    FWIW, Module::Build is being phased out (of the core). And I, for one, welcome our new insect overlords: Module::Install. Module::Build based CPAN modules were the only ones I ever had trouble with and I never understood how so many smart monks and Perl hackers could keep recommending it as The Way™.