Build.PL
use lib 'inc';
use Local::Module::Build::Extensionless;
my $build = Local::Module::Build::Extensionless->new(
module_name => 'Foo::Bar',
license => 'restricted',
);
$build->add_build_element('lib');
$build->create_build_script;
inc/Local/Module/Build/Extensionless.pm
package Local::Module::Build::Extensionless;
use parent 'Module::Build';
use File::Next qw();
sub process_lib_files {
my ($self) = @_;
my $files;
{
my $iter = File::Next::files('lib');
while (defined(my $file = $iter->())) {
$files->{$file} = $file;
}
}
# following piece from Module::Build::Base::process_files_by_extension
while (my ($file, $dest) = each %$files) {
$self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $dest));
}
};
1;
しかし、なぜそんなに複雑なのですか?本当に必要なのはshare_dirです。