Matisse Enzer wrote:
On Tue, 28 Mar 2006, Randy W. Sims wrote:

There are a number of ways to do this. The most simple is:

use strict;
use warnings;

use File::HomeDir;
my $conf_dir = File::Spec->catdir( File::HomeDir->my_home, '.Foo' );

use Module::Build;
my $builder = Module::Build->new(
     module_name  => 'Foo',
     license      => 'perl',

     conf_files => {
         'etc/httpd.conf' => 'conf/httpd.conf',
     },

     install_path => {
         'conf' => $conf_dir,
     },
);

$builder->add_build_element( 'conf' );

$builder->create_build_script();

__END__

I haven't been able to get this approach to work.

The file(s) from the new build_element *do* get copied into blib, so in the above example httpd.conf gets copied to blib/conf/httpd.conf
but, when i do     Build install    it does not get installed.

I looked in   _build/build_params   and the   install_path  hash
does contain an entry for my new build element(s), but nothing gets installed there when I run ./Build install (and ./Build fakesinstall doesn't show the files either.)

Did you try the script as above? I tested it on M::B 0.2612 & 0.27x from cvs. Can you post your Build.PL script?

Note that the entries in install_path must have the same name as supplied to add_build_element() (not with the '_files' appendage).

Regards,
Randy.

(Who hasn't been able to access sf.net cvs repository for +15 hrs now.)

Reply via email to