Custom Perl target location with Module::Build

124 views Asked by At

I've customized a Module::Build script to install files from a perllib/ directory in my sandbox to perl/ in the target directory.

# Install perllib
$build->add_build_element("perllib");
$build->install_path(perllib => "$install_base/perl");

When I run ./Build test, Perl can't find the files under blib/ because it doesn't know that that these perllib files belong on @INC.

Is it possible to add the custom perllib directory to the installation, in such a way that the build system understands that they're Perl files, which should be included when we run tests?

1

There are 1 answers

0
ajwood On BEST ANSWER

There isn't a good reason to keep this perllib/ directory in the module. I renamed it to lib/ and customized its installation location.

my $build = Module::Build->new();
$build->install_base_relpaths(lib => 'perl');