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

I'm trying to wrap up some modules to put on CPAN, but I'm having some difficulty configuring ExtUtils::MakeMaker correctly.

I've got a module, Point, that's used in my test files, but not in the main part of the codebase. I'd like it to be included when running tests, but not be part of the general installation.

I've googled around some, and read the documentation and source of ExtUtils::MakeMaker, but to no avail. Is there a canonical way to include these kinds of files?

  • Comment on Including modules exclusively for testing with ExtUtils::MakeMaker

Replies are listed 'Best First'.
Re: Including modules exclusively for testing with ExtUtils::MakeMaker
by jeffa (Bishop) on Mar 26, 2015 at 22:47 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.
        *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";