Command-Run
view release on metacpan or search on metacpan
lib/Command/Run.pm view on Meta::CPAN
$obj->update(%args);
if (my $ref = $stdout_ref // $obj->{STDOUT_REF}) {
$$ref = $obj->data;
}
if (my $ref = $stderr_ref // $obj->{STDERR_REF}) {
$$ref = $obj->error;
}
return $obj->result;
}
sub update {
use Time::localtime;
my $obj = shift;
my %args = @_;
my $command = delete $args{command};
my @command = defined $command ?
(ref $command eq 'ARRAY' ? @$command : $command) : $obj->command;
if (@command) {
$obj->{RESULT} = $obj->execute(\@command, %args);
# Store stdout in temp file for path access
my $fh = $obj->fh;
( run in 3.304 seconds using v1.01-cache-2.11-cpan-364913b4093 )