Subject: | Module::Build::Compat gets EXE_FILES wrong |
I recently released App::Pgrep and the very first report was a failure
to install. The following error message was generated:
make: *** No rule to make target \
`/Users/ovid/code/App-Pgrep/bin/pgrep', \
needed by `blib/script/pgrep'. Stop.
Hey, that's a report from someone else, but that's a path on *my*
machine. Here's my Build.PL:
use strict;
use warnings;
use Module::Build;
my $builder = Module::Build->new(
module_name => 'App::Pgrep',
license => 'perl',
dist_author => 'Curtis Poe <ovid@cpan.org>',
dist_version_from => 'lib/App/Pgrep.pm',
build_requires => {
'Scalar::Util' => 1.19,
'Test::More' => 0,
'File::Next' => 0.40,
'PPI' => 1.118,
},
exe_files => ['bin/pgrep'],
add_to_cleanup => ['App-Pgrep-*'],
create_makefile_pl => 'traditional',
);
$builder->create_build_script();
Note that I have 'create_makefile_pl' in there. Here's the broken
makefile it generated, with an absolute path to bin/pgrep instead of a
relative one:
# Note: this file was auto-generated by Module::Build::Compat version 0.03
use ExtUtils::MakeMaker;
WriteMakefile
(
'PL_FILES' => {},
'INSTALLDIRS' => 'site',
'NAME' => 'App::Pgrep',
'EXE_FILES' => [
'/Users/ovid/code/App-Pgrep/bin/pgrep'
],
'VERSION_FROM' => 'lib/App/Pgrep.pm',
'PREREQ_PM' => {
'Test::More' => 0,
'Scalar::Util' => '1.19',
'PPI' => '1.118',
'File::Next' => '0.4'
}
)
;
I can work around this by manually editing Makefile.PL every time it
changes, but I'm going to forget and this will happen again :(
Cheers,
Ovid