Net-SSH-Any

 view release on metacpan or  search on metacpan

lib/Net/SSH/Any/Backend/Sshg3_Cmd.pm  view on Meta::CPAN

    1;
}

sub _make_cmd {
    my ($any, $cmd_opts, $cmd) = @_;
    my $be_opts = $any->{be_opts};

    # FIXME: the environment variable should only be set when running
    # the sshg3 command, not globally!
    if (defined (my $broker_address = $be_opts->{broker_address})) {
        $any->_os_setenv(SSH_SECSH_BROKER => $broker_address);
    }

    my @args = ( $be_opts->{local_sshg3_cmd},
                 @{$be_opts->{local_sshg3_extra_args}},
                 '-B', '-enone', '-q',
                 "--hostkey-policy=$be_opts->{hostkey_policy}");

    push @args, '--exclusive' if $be_opts->{exclusive};
    push @args, "-l$be_opts->{user}" if defined $be_opts->{user};
    push @args, "-p$be_opts->{port}" if defined $be_opts->{port};

lib/Net/SSH/Any/OS/_Base.pm  view on Meta::CPAN


use Carp;
our @CARP_NOT = ('Net::SSH::Any::Backend::_Cmd');

use POSIX ();
use Net::SSH::Any::Util qw($debug _debug _array_or_scalar_to_list);
use Net::SSH::Any::Constants qw(:error);

sub loaded { 1 } # helper method to ensure the module has been correctly loaded

sub setenv {
    my ($any, $key, $value) = @_;
    # FIXME: this fails on threaded perls on Windows.
    $ENV{$key} = $value;
    1;
}

sub pty {
    my $any = shift;
    $any->_load_module('IO::Pty') or return;
    IO::Pty->new;



( run in 0.975 second using v1.01-cache-2.11-cpan-6aa56a78535 )