Subject: | Using add_build_element to install custom files |
Hi Ken,
I was following the Cookbook example that shows the usage of add_build_element to copy extra files when building and installing a module. When I use it as shown in the example of copying files not in the lib/ directory, it will create a new subdirectory for me. However, the `Build install` process will not follow-through and copy these news files to the install_base path.
Other than setting install_path, I see no way to get these addt'l, non-standard directories to be copied. Unfortunately, install_path requires an absolute path which does not support dynamic build and install. Is there anything I'm doing wrong in my configuration (see snippet below) which would cause these extra directories not to be copied? From what I could follow of the code, in order for a directory to get installed, it needs to be in the hash returned by install_types(). Is there some way I can get install_path to be relative to install_base?
my $build = MyBuilder->new (
... snip ...
extra_files => {
't/conf/test.setup.dat' => 'example/test.setup.dat',
't/htdocs/mailform.cgi' => 'example/mailform.cgi',
}
);
$build->add_build_element('extra');
$build->create_build_script;
BTW, a note in the Cookbook that indicates that it is not possible to copy files to a custom directory would be helpful to others who are learning how the build system works. I was expecting all the files that got copied into blib/ to be installed when I ran `./Build install`.
Thanks,
William