Gerrit-Client
view release on metacpan or search on metacpan
lib/Gerrit/Client.pm view on Meta::CPAN
$cv->cb(
sub {
my $status = shift->recv();
if ( $status && $options->{on_error} ) {
$options->{on_error}->("$cmdstr exited with status $status");
}
if ( !$status && $options->{on_success} ) {
$options->{on_success}->();
}
# make sure we stay alive until this callback is executed
undef $cv;
}
);
return;
}
# options to Gerrit::Client::query which map directly to options to
# "ssh <somegerrit> gerrit query ..."
my %GERRIT_QUERY_OPTIONS = (
lib/Gerrit/Client.pm view on Meta::CPAN
my $cv = AnyEvent::Util::run_cmd( \@cmd, '>' => \$output );
my $cmdstr;
{
local $LIST_SEPARATOR = '] [';
$cmdstr = "[@cmd]";
}
$cv->cb(
sub {
# make sure we stay alive until this callback is executed
undef $cv;
my $status = shift->recv();
if ( $status && $options{on_error} ) {
$options{on_error}->("$cmdstr exited with status $status");
return;
}
return unless $options{on_success};
( run in 1.066 second using v1.01-cache-2.11-cpan-39bf76dae61 )