Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: dave.wolaver [...] nagra.com
Cc:
AdminCc:

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



From dave.wolaver [...] nagra.com Wed Apr 4 13: 29:59 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-1.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001] autolearn=ham
X-Spam-Flag: NO
Acceptlanguage: en-US
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Language: en-US
Content-Type: multipart/alternative; boundary="_000_57CBEA363606104480E153C6B190496F93EF6AD577perseusatllwn_"
Message-ID: <57CBEA363606104480E153C6B190496F93EF6AD577 [...] perseus.atl.lw.net>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-MS-Tnef-Correlator:
X-Spam-Score: -1.899
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id ECD6A2401B1 for <cpan-bug+Net-Telnet [...] hipster.bestpractical.com>; Wed, 4 Apr 2012 13:29:58 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n43A9TOU8y4n for <cpan-bug+Net-Telnet [...] hipster.bestpractical.com>; Wed, 4 Apr 2012 13:29:56 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id E65BB240022 for <bug-Net-Telnet [...] rt.cpan.org>; Wed, 4 Apr 2012 13:29:55 -0400 (EDT)
Received: (qmail 24760 invoked by uid 103); 4 Apr 2012 17:29:55 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 4 Apr 2012 17:29:55 -0000
Received: from mail.lw.net (HELO mail.lw.net) (70.43.182.210) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Wed, 04 Apr 2012 10:29:51 -0700
Received: from perseus.atl.lw.net ([192.168.80.7]) by perseus.atl.lw.net ([192.168.80.7]) with mapi; Wed, 4 Apr 2012 13:29:47 -0400
Delivered-To: cpan-bug+Net-Telnet [...] hipster.bestpractical.com
Subject: Unable to turn off dump_log
Return-Path: <dave.wolaver [...] nagra.com>
X-RT-Mail-Extension: net-telnet
X-Original-To: cpan-bug+Net-Telnet [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Thread-Index: Ac0SiGa1iXjTDPkYSRqagzLhXZQF7g==
Date: Wed, 4 Apr 2012 13:28:52 -0400
X-Spam-Level:
X-MS-Has-Attach:
Thread-Topic: Unable to turn off dump_log
Accept-Language: en-US
To: "bug-Net-Telnet [...] rt.cpan.org" <bug-Net-Telnet [...] rt.cpan.org>
From: Dave Wolaver <dave.wolaver [...] nagra.com>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: us-ascii
Content-Length: 2001
Download (untitled) / with headers
text/plain 1.9k
Hello, The Net::Telnet module has been incredibly useful for me and has been rock solid. Thanks for the EXCELLENT work in developing and supporting it. I believe I have encountered a small bug in dump_log. I am continually calling 'cmd' and expecting a response from a device. When the device does not respond as expected (a low percentage of the time), I am using dump_log to investigate the failures. So, prior to calling 'cmd' I call dump_log as below. my ($debug_log_fn, $debug_log_fh); open($debug_log_fh, '>', $debug_log_fn); $self->{'OBJ_TELNET'}->dump_log($debug_log_fh); After the call to 'cmd', I close the dump file and delete it if the command was successful (ie. I don't need to see that dump). $self->{'OBJ_TELNET'}->dump_log(''); close($debug_log_fh); unlink($debug_log_fn) or die "Could not delete file $debug_log_fn! $!\n"; Everything seems to work fine except that I get errors. print() on closed filehandle $debug_log_fh at C:/Perl64/lib/Net/Telnet.pm line 2456, <$parent> line 5 (#1) (W closed) The filehandle you're printing on got itself closed sometime before now. Check your control flow. In the function dump_log, it appears as though passing the empty string '' does not set the hash entry $s->{dumplog} to false which leads to the errors. I can work around the problem by commenting out the 'or return' in dump_log. I believe the same bug may also be in 'input_log' but I have not verified. One other point... the reason I am passing a filehandle is because I was unable to delete the file when calling 'dump_log' with a filename. This is most likely because the filehandle is not closed when calling dump_log with the empty string. It would be nice to handle this case as well. Of course, there is always the possibility that my analysis may not be correct, or I have made a mistake on my side. Thanks for your attention and support. Best regards, Dave Perl Dist: Active Perl 5.12.2 Build 1203 (64 bit) Perl Version: 5.12.2 OS: Windows 7 - 64 bit
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: us-ascii
Content-Length: 11264
MIME-Version: 1.0
In-Reply-To: <57CBEA363606104480E153C6B190496F93EF6AD577 [...] perseus.atl.lw.net>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <57CBEA363606104480E153C6B190496F93EF6AD577 [...] perseus.atl.lw.net>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6252-1355629878-176.76306-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 139
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.