Alien-Base-ModuleBuild
view release on metacpan or search on metacpan
[version 0.024]
my %result = $amb->alien_do_system($cmd)
Similar to Module::Build's do_system, also sets the path and several
environment variables in accordance to the object configuration (i.e.
alien_bin_requires) and performs the interpolation of the patterns
described in "COMMAND INTERPOLATION" in Alien::Base::ModuleBuild::API.
Returns a set of key value pairs including stdout, stderr, success and
command.
alien_do_commands
$amb->alien_do_commands($phase);
Executes the commands for the given phase.
alien_interpolate
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
$self->verbose(0);
my ($out, $err, $success) =
$verbose
? tee { $self->SUPER::do_system(@args) }
: capture { $self->SUPER::do_system(@args) }
;
$self->verbose($old_super_verbose);
my %return = (
stdout => $out,
stderr => $err,
success => $success,
command => join(' ', @args),
);
# restore wd
$CWD = $initial_cwd;
return wantarray ? %return : $return{success}; ## no critic (Policy::Community::Wantarray)
}
lib/Alien/Base/ModuleBuild.pm view on Meta::CPAN
my %result = $amb->alien_do_system($cmd)
Similar to
L<Module::Build's do_system|Module::Build::API/"do_system($cmd, @args)">,
also sets the path and several environment variables in accordance
to the object configuration (i.e. C<alien_bin_requires>) and
performs the interpolation of the patterns described in
L<Alien::Base::ModuleBuild::API/"COMMAND INTERPOLATION">.
Returns a set of key value pairs including C<stdout>, C<stderr>,
C<success> and C<command>.
=head2 alien_do_commands
$amb->alien_do_commands($phase);
Executes the commands for the given phase.
=head2 alien_interpolate
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
use strict;
use warnings;
use parent 'Alien::Base::ModuleBuild';
use Capture::Tiny qw( capture );
sub alien_check_installed_version
{
# see Alien::Base::ModuleBuild#alien_check_installed_version for details
my($self) = @_;
my($stdout, $stderr) = capture { system 'mytool', '--version' };
# return empty list if the tool is unavailable on the system,
# or unacceptable.
return if $! || ...;
# parse from stdout or stderr
my $version = ...;
return $version;
}
sub alien_check_built_version
{
# see Alien::Base::ModuleBuild#alien_check_built_version for details
# return empty list if the tool version cannot be found, or if it
# is unacceptable. Note that this will cause a failure, so "unknown"
t/alien_base_modulebuild_repository.t view on Meta::CPAN
use Test2::V0 -no_srand => 1;
use Alien::Base::ModuleBuild::Repository;
use File::chdir;
use Path::Tiny qw( path );
use Capture::Tiny qw( capture_stderr );
my $network_fetch = 0;
my $secure_fetch = 1;
@INC = map { path($_)->absolute->stringify } @INC;
# This test will not pass with digest required. It does not download anything
# off the internet.
$ENV{ALIEN_DOWNLOAD_RULE} = 'warn' if defined $ENV{ALIEN_DOWNLOAD_RULE} && $ENV{ALIEN_DOWNLOAD_RULE} eq 'digest';
$ENV{ALIEN_DOWNLOAD_RULE} = 'digest_or_encrypt' if defined $ENV{ALIEN_DOWNLOAD_RULE} && $ENV{ALIEN_DOWNLOAD_RULE} eq 'digest_and_encrypt';
xt/author/pod_spelling_system.t view on Meta::CPAN
if -r $config_filename;
plan skip_all => 'disabled' if $config->{pod_spelling_system}->{skip};
chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir));
add_stopwords($config->{pod_spelling_system}->{stopwords}->@*);
add_stopwords(qw(
Plicease
stdout
stderr
stdin
subref
loopback
username
os
Ollis
Mojolicious
plicease
CPAN
reinstall
( run in 1.146 second using v1.01-cache-2.11-cpan-49f99fa48dc )