|
Hello everybody.
The next listen code take below error...
my $override = Sub::Override->new(shell => sub {
#$override->replace (shell => sub {
my $ssh = shift;
my $cmgr = $ssh->channel_mgr;
my $channel = $ssh->_session_channel;
$channel->open;
$channel->register_handler(SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, sub {
my($channel, $packet) = @_;
my $r_packet = $channel->request_start('pty-req', 0);
my($term) = $ENV{TERM} =~ /(\w+)/;
$r_packet->put_str($term);
$r_packet->put_int32(0) for 1..4;
$r_packet->put_str("");
$r_packet->send;
$channel->{ssh}->debug("Requesting shell.");
$channel->request("shell", 0);
}); # <<-- 45 row
$override->replace;
What's wrong in this? This code to be verify it's me in use any net-ssh-per modules. Just as Net::SSH::Perl(FreeBSD) and Net::SSH::W32Perl(Windows). Could your help to me any ways?
# perl -c tst_5
tst_5 syntax OK
# perl tst_5
Cannot replace non-existent sub (main::shell) at tst_5 line 45
___
Thank in advance.
|