in reply to CPAN not so comprehensive
If you look at the sample, the exec method is called on a $chan object. And if you look at the previous line:
my $chan = $ssh2->channel(); $chan->exec('program');
You'll see that is create using the channel() method. Look down for the documentation on the channel method and you find:
channel ( [type, [window size, [packet size]]] ) Creates and returns a new channel object. See Net::SSH2::Channel.
That reference to Net::SSH2::Channel is a live link, and if you click it, you'll find:
exec ( command ) Execute the command on the remote host (calls process("exec", command)). Note that the given command is parsed by the remote shell; it should be properly quoted, specially when passing data from untrusted sources.
Modules by this author are better (if sometimes more tersely) documented than most.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CPAN not so comprehensive
by Anonymous Monk on Mar 27, 2018 at 04:44 UTC | |
by BrowserUk (Patriarch) on Mar 27, 2018 at 05:06 UTC |