App-cpm
view release on metacpan or search on metacpan
lib/App/cpm/Builder/EUMM.pm view on Meta::CPAN
package App::cpm::Builder::EUMM;
use v5.24;
use warnings;
use experimental qw(lexical_subs signatures);
use parent 'App::cpm::Builder::Base';
sub supports ($class, @) {
-f 'Makefile.PL';
}
sub configure ($self, $ctx, $dependency_libs, $dependency_paths) {
if (!$ctx->{make}) {
$ctx->log("There is Makefile.PL, but you don't have 'make' command; you should install 'make' command first");
return;
}
my @cmd = ($ctx->{perl}, 'Makefile.PL');
push @cmd, "INSTALL_BASE=$self->{install_base}" if $self->{use_install_command} && $self->{install_base};
push @cmd, qw(INSTALLMAN1DIR=none INSTALLMAN3DIR=none) if $self->{need_noman_argv};
push @cmd, 'PUREPERL_ONLY=1' if $self->{pureperl_only};
push @cmd, $self->{argv}->@* if $self->{argv}->@*;
$self->run_configure($ctx, \@cmd, $dependency_libs, $dependency_paths) && -f 'Makefile';
}
sub build ($self, $ctx, $dependency_libs, $dependency_paths) {
my $ok = $self->run_build($ctx, [ $ctx->{make} ], $dependency_libs, $dependency_paths);
return if !$ok;
$self->_prepare_paths_cache;
$self->_write_blib_meta($ctx);
return 1;
}
sub test ($self, $ctx, $dependency_libs, $dependency_paths) {
$self->run_test($ctx, [ $ctx->{make}, "test" ], $dependency_libs, $dependency_paths);
}
sub install ($self, $ctx, $dependency_libs = [], $dependency_paths = []) {
return $self->SUPER::install($ctx, $dependency_libs, $dependency_paths) if !$self->{use_install_command};
my $ok = $self->run_install($ctx, [ $ctx->{make}, "install" ], $dependency_libs, $dependency_paths);
return if !$ok;
$self->_install_blib_meta($ctx);
return 1;
}
sub needs_install_env ($self) {
return $self->{use_install_command} ? 1 : 0;
}
1;
( run in 0.760 second using v1.01-cache-2.11-cpan-5735350b133 )