Skip Menu |

This queue is for tickets about the Net-Telnet-Cisco CPAN distribution.

Report information
The Basics
Id: 19285
Status: resolved
Priority: 0/
Queue: Net-Telnet-Cisco

People
Owner: Nobody in particular
Requestors: OLIVER [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.10
Fixed in: 1.11



Subject: Module needs to override fhopen()
As Net::Telnet::Cisco is a derived class of Net::Telnet then all Net::Telnet methods may be called upon Net::Telnet::Cisco instances. The Net::Telnet::fhopen() method breaks when called upon a Net::Telnet::Cisco object, so it needs to be overridden to work properly. The problem is that fhopen() "backs up" its object data before pivoting its GLOB onto the new filehandle, then restores the data. It only backs up the Net::Telnet object data so in this process the Net::Telnet::Cisco object data (i.e. *$self->{net_telnet_cisco}) is lost! The override is quite simple, and can be worked out by inspection of the Net::Telnet::fhopen() code for the backup and restore procedure, which can be called around $self->SUPER::fhopen(). There should also be a test for use of fhopen() in the Net::Telnet::Cisco package. This problem is not something that Net::Telnet can fix because it doesn't know who its derived classes are or how they store object data, e.g. *$self->{net_telnet_foo}.
Fixed in 1.11.