If EXE_FILES works, I'd use that.
The problem with PM is that if you use it, it prevents automatic discovery of (other) .pm files. I had to add to some generated .pm files to PM and I didn't want to list all the static .pm files, so I added the following to Makefile.PL:
BEGIN {
package MY;
use File::Spec::Functions qw( catdir catfile );
sub init_PM {
my $self = shift;
$self->SUPER::init_PM(@_);
my @path = qw( ... );
my $src_base = catdir('lib', @path);
my $dst_base = join('$(DIRFILESEP)', '$(INST_LIB)', @path);
for (...) {
my $src = catfile( $src_base, "$_.pm");
my $dst = join('$(DIRFILESEP)', $dst_base, "$_.pm");
$self->{PM}{$src} = $dst;
}
}
}
So to add a .pl, you'd use
BEGIN {
package MY;
use File::Spec::Functions qw( catdir catfile );
sub init_PM {
my $self = shift;
$self->SUPER::init_PM(@_);
my $src_base = 'bin';
my $dst_base = '$(INSTALLSCRIPT)';
for ('script.pl', ...) {
my $src = catfile( $src_base, $_);
my $dst = join('$(DIRFILESEP)', $dst_base, $_);
$self->{PM}{$src} = $dst;
}
}
}
|