in reply to Cisco Telnet
Hi,
after doing all advice theoretically (I'm not a network admin), I coded a small test to see where the problem is:
1 #!/usr/bin/env perl 2 use 5.010; 3 use strict; 4 use utf8; 5 use warnings qw(all); 6 7 use local::lib 'cisco'; 8 9 use Net::Telnet::Cisco; 10 11 my $session = Net::Telnet::Cisco->new( 12 Host => "192.168.168.2", 13 Timeout => 3, 14 ); 15 $session->login(Password => 'secret');
A run of that shows:
problem connecting to "192.168.168.2", port 23: connect timed-out at a +m304.pl line 11
AAAAHHH, the exception is thrown on line 11. It seems that the method new is doing a connect to host mentioned. IMHO that's an API misdesign, but anyways.
Conclusion:
BUT: Now the interesting part. Putting an eval around the method new can catch the exception, but not the exception message. And that's worth another thread herein.
Best regards
McA
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Cisco Telnet
by mvip (Acolyte) on Aug 26, 2013 at 14:20 UTC | |
|
Re^2: Cisco Telnet
by mvip (Acolyte) on Aug 26, 2013 at 14:25 UTC | |
by mvip (Acolyte) on Aug 27, 2013 at 16:18 UTC |