Alien-SDL2
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
print STDERR "CMD: $c\n";
print STDERR "- running (stdout+stderr redirected)...\n";
my $rv = run3($cmd, \undef, \$output, \$output, { return_if_system_error => 1 } );
my $success = ($rv == 1 && $? == 0) ? 1 : 0;
if ($success) {
print STDERR "- finished successfully (output suppressed)\n";
}
else {
$output = substr $output, -$limit if defined $limit; # we want just last N chars
if (!defined($limit)) {
print STDERR "OUTPUT:\n", $output, "\n";
}
elsif ($limit>0) {
print STDERR "OUTPUT: (only last $limit chars)\n", $output, "\n";
}
}
return $success;
}
sub run_output_std {
my ($self, $cmd) = @_;
my $c = ref($cmd) eq 'ARRAY' ? join(' ',@$cmd) : $cmd;
print STDERR "CMD: $c\n";
my $rv = run3($cmd, undef, undef, undef, { return_if_system_error => 1 } );
( run in 0.276 second using v1.01-cache-2.11-cpan-4e96b696675 )