Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: tim [...] timsheahan.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.03
Fixed in: 3.04



Subject: incomplete support for logging to blessed refs which are not GLOBs
Download (untitled) / with headers
text/plain 986b
Net::Telnet offers logging to filehandles or filenames using the Input_log option. When this option is specified, the filehandle is processed by _fname_to_handle() (Telnet.pm line 2220) before being saved for later use. When a logging event occurs, _log_print() (Telnet.pm line 2448) is called, and this subroutine supports calling the print() method of a blessed ref which is not a GLOB. In order for this to work as hoped when supplying an object to new(Input_log=> ), the behavior of _fname_to_handle needs to be changed at line 2239: select((select($fh), $|=1)[$[]); # don't buffer writes The select call fails on an object which is not a GLOB. Could a conditional statement similar to the one in _log_print() be placed into _fname_to_handle(), so that the select call is only made if the filehandle is a GLOB ? The altered code in _fname_to_handle would look like this: if (ref($fh) and ref($fh) eq "GLOB") { # fh is a GLOB select((select($fh), $|=1)[$[]); } Cheers -
Download (untitled) / with headers
text/plain 139b
Fixed in the development version for 3.04. You can find the development version at ftp://ftp.rgrs.com Thanks for submitting this request.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.