How to ignore warnings using Net::Telnet::Cisco in Perl 5.8?

599 Views Asked by At

I installed. Net::telnet::cisco module in Perl 5.8 and trying to do following:

my $session = Net::Telnet::Cisco->new(Host=>'192.168.1.1',Ignore_warnings=>1);

But this doesn't seem to work and gives following error:

bad named parameter "Ignore_warnings" given to Net::Telnet::Cisco::new()

Any ideas what is the issue?

1

There are 1 best solutions below

1
On

Separate it out:

my $session = Net::Telnet::Cisco->new(Host => $host);
$session->ignore_warnings(1);

Looks like a bug in NTC to me. I expect it's supposed to remove its parameters from the list before calling SUPER::new.