AWS-CLIWrapper
view release on metacpan or search on metacpan
- Specified min perl version both in module and dist metadata
- Added github repo to dist metadata
- Add servics with aws-cli/1.10.9 (PR #11 by @mithun)
1.09 2015-10-02
[IMPROVEMENTS]
- Support ec2 wait (PR #9 by @negachov)
1.08 2015-08-19
[IMPROVEMENTS]
- write stdout/stderr message in debug mode (PR #8 by @limitusus)
1.07 2015-07-21
[IMPROVEMENTS]
- Don't execute aws command in load phase
1.06 2014-11-25
[IMPROVEMENTS]
- s3 OPERATION can take --include or --exclude option multiple times
1.05 2014-09-29
lib/AWS/CLIWrapper.pm view on Meta::CPAN
return $ret;
}
}
sub _run {
my ($self, $opt, $cmd) = @_;
my $ret;
if (exists $opt->{'nofork'} && $opt->{'nofork'}) {
# better for perl debugger
my($ok, $err, $buf, $stdout_buf, $stderr_buf) = IPC::Cmd::run(
command => join(' ', @$cmd),
timeout => $opt->{timeout} || $self->{timeout},
);
$ret->{stdout} = join "", @$stdout_buf;
$ret->{err_msg} = (defined $err ? "$err\n" : "") . join "", @$stderr_buf;
if ($ok) {
$ret->{exit_code} = 0;
$ret->{timeout} = 0;
} else {
lib/AWS/CLIWrapper.pm view on Meta::CPAN
exclude => ['foo', 'bar'],
})
Third arg "opt" is optional. Available key/values are below:
timeout => Int
Maximum time the "aws" command is allowed to run before aborting.
default is 30 seconds, unless overridden with AWS_CLIWRAPPER_TIMEOUT environment variable.
nofork => Int (>0)
Call IPC::Cmd::run vs. IPC::Cmd::run_forked (mostly useful if/when in perl debugger). Note: 'timeout', if used with 'nofork', will merely cause an alarm and return. ie. 'run' will NOT kill the awscli command like 'run_forked' will.
croak_on_error => Int (>0)
When set to a truthy value, this will make AWS::CLIWrapper to croak() with error message when `aws` command exits with non-zero status. Default behavior is to set $AWS::CLIWrapper::Error and return.
catch_error_pattern => RegExp
When defined, this option will enable catching `aws-cli` errors matching this pattern
and retrying `aws-cli` command execution. Environment variable
AWS_CLIWRAPPER_CATCH_ERROR_PATTERN takes precedence over this option, if both
are defined.
( run in 1.099 second using v1.01-cache-2.11-cpan-49f99fa48dc )