Group
Extension

Matches 3

App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Client.pm ( view source; MetaCPAN )
 App::BCSSH::Message qw(send_message BCSSH_SUCCESS BCSSH_FAILURE BCSSH_COMMAND);
use JSON qw(encode_json decode_json);
use Moo::Role;

has 'agent' => ( is => 'ro', default => sub { $ENV{SSH_AUTH_SOCK}
@_;
    my $key = $self->auth_key || '';
    my $message = join '|', $self->handler, $key, encode_json(\@args);
    my ($rtype, $rmessage) = send_message($self->agent_socket, BCSSH_COMMAND, $message);
 unless (defined $rmessage && length $rmessage) {
        return;
    }
    my $response = decode_json($rmessage);
    return wantarray ? @$response : 1;
}

1;
__END__

=head1 NAME

App::BCSSH::Client
App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Command/ssh.pm ( view source; MetaCPAN )
App::BCSSH::Proxy;
use App::BCSSH::Options;
use App::BCSSH::Util qw(find_mods rc_dir);
use JSON qw(decode_json);
use constant DEBUG => $ENV{BCSSH_DEBUG};

with Options(
    permute => 0,
);
with 'App:
 rc_dir . '/config'
        or return {};
    my $raw = do { local $/; <$fh> };
    return decode_json($raw);
}

sub run {
    my $self = shift;
    my $args = $self->args;
    my $host = $self->host;
App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Handler.pm ( view source; MetaCPAN )
package App::BCSSH::Handler;
use Moo::Role;
use JSON qw(encode_json decode_json);
use App::BCSSH::Message;
use MooX::CaptainHook qw(on_application);

my %handlers;
sub handlers {
    return %handlers;
 {
    my ($self, $args, $send, $socket) = @_;
    my $json_send = sub {
        my @response = @_;
        my $rmessage = @response ? encode_json(\@response) : '';
        $send->(BCSSH_SUCCESS, $rme
ssage);
        return $socket;
    };
    my $handler_args = decode_json($args);
    $self->handle($json_send, @$handler_args);
    return;
}

sub handler {
    my $self = shift;
    return sub {
   

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.