in reply to Including modules exclusively for testing with ExtUtils::MakeMaker

I put such modules into t/lib ... for example: https://github.com/jeffa/DesignPatterns-Perl/tree/master/t/lib

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: Including modules exclusively for testing with ExtUtils::MakeMaker
by lackita (Sexton) on Mar 26, 2015 at 22:56 UTC
    How do you configure ExtUtils::MakeMaker to find those libraries. I just tried moving it there, but then I just get a bunch of failures when I run make test.
        Ah, that makes sense, thank you.
      *cough* in case its run as   perl DesignPatterns-Perl/t/101-abstract-factory.t

      you could instead write

      use File::FindLib 'lib';

      or

      use FindBin qw($Bin); use lib "$Bin/lib";

        Thanks for pointing that out. I use FindBin from time to time, mostly when i write code that others will be using. In this case, i always run my tests like so: (from the DesignPatterns-Perl dir)

        prove -lrj4 
        

        Additionally, make test works "right out of the box":

        jeffa

        L-LL-L--L-LL-L--L-LL-L--
        -R--R-RR-R--R-RR-R--R-RR
        B--B--B--B--B--B--B--B--
        H---H---H---H---H---H---
        (the triplet paradiddle with high-hat)