Skip Menu |

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

Report information
The Basics
Id: 105741
Status: new
Priority: 0/
Queue: Net-Telnet

People
Owner: jay [...] rgrs.com
Requestors: andrewo [...] cpan.org
Cc: i.am.andrewo [...] gmail.com
AdminCc:

Bug Information
Severity: Important
Broken in: 3.04
Fixed in: (no value)



CC: i.am.andrewo [...] gmail.com
Subject: Setting Input_log, Output_Log or Option_log to "" explicitly causes instantiation to fail
Current code: # perl -MNet::Telnet -MData::Dumper -E 'warn Dumper( Net::Telnet->new( -host => "127.0.0.1", Input_log => "" ) );' Warning: something's wrong at -e line 1. After the patch: # perl -MNet::Telnet -MData::Dumper -E 'warn Dumper( Net::Telnet->new( -host => "127.0.0.1", Input_log => "" ) );' $VAR1 = bless( \*Symbol::GEN0, 'Net::Telnet' ); See attached for diff.
Subject: net-telnet-304-input-log-fix.txt
--- /usr/share/perl5/Net/Telnet.pm 2013-09-16 19:50:35.000000000 +1000 +++ lib/Net/Telnet.pm 2015-07-08 16:38:54.485489290 +1000 @@ -250,17 +250,17 @@ } if (defined $input_log) { # user wants to set input_log - $self->input_log($input_log) + defined( $self->input_log($input_log) ) or return; } if (defined $option_log) { # user wants to set option_log - $self->option_log($option_log) + defined( $self->option_log($option_log) ) or return; } if (defined $output_log) { # user wants to set output_log - $self->output_log($output_log) + defined( $self->output_log($output_log) ) or return; }
Updated patch.
Subject: net-telnet-304-input-log-fix.txt
--- /usr/share/perl5/Net/Telnet.pm 2013-09-16 19:50:35.000000000 +1000 +++ lib/Net/Telnet.pm 2015-07-08 16:57:34.342666438 +1000 @@ -245,22 +245,22 @@ } if (defined $dump_log) { # user wants to set dump_log - $self->dump_log($dump_log) + defined( $self->dump_log($dump_log) ) or return; } if (defined $input_log) { # user wants to set input_log - $self->input_log($input_log) + defined( $self->input_log($input_log) ) or return; } if (defined $option_log) { # user wants to set option_log - $self->option_log($option_log) + defined( $self->option_log($option_log) ) or return; } if (defined $output_log) { # user wants to set output_log - $self->output_log($output_log) + defined( $self->output_log($output_log) ) or return; }