Skip Menu |

This queue is for tickets about the Term-Pager CPAN distribution.

Report information
The Basics
Id: 64346
Status: rejected
Priority: 0/
Queue: Term-Pager

People
Owner: Nobody in particular
Requestors: ben [...] okopnik.com
Cc:
AdminCc:

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



Subject: Term::Pager bugs and patch
Date: Thu, 30 Dec 2010 14:12:34 -0500
To: bug-Term-Pager [...] rt.cpan.org
From: Ben Okopnik <ben [...] okopnik.com>
Hi - $Term::Pager::VERSION = '1.00'; This is perl, v5.10.0 built for i486-linux-gnu-thread-multi Linux Jotunheim 2.6.31-22-generic #69-Ubuntu SMP Wed Nov 24 08:51:08 UTC 2010 i686 GNU/Linux Running the example script (eg/example1.pl) after enabling warnings throws a large number of errors: --------------------------------------------------------------------------------- Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in substr at /usr/local/share/perl/5.10.0/Term/Pager.pm line 305. Use of uninitialized value in sprintf at /usr/local/share/perl/5.10.0/Term/Pager.pm line 204. [more] 23% Top <space>=down <b>=back <h>=help <q>=quitager.pm line 310. 23 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$ --------------------------------------------------------------------------------- This is happening because Pager.pm has several calls to entities like $me->{left} and $me->{msg} that are not defined anywhere. There's also a lexical comparison against $me->{search} and a numerical one against $l, both of which exist but are undefined. Please see the attached patch, which addresses all of the above. There's also a bit of cruft in there that I left alone, since it doesn't throw an error but is likely something the author meant to fix: 216: sub done { 217: die \ 'foo'; 218: } Could that be a 'FIXME', perhaps? :) Cheers, Ben Okopnik -- OKOPNIK CONSULTING Custom Computing Solutions For Your Business Expert-led Training | Dynamic, vital websites | Custom programming 443-250-7895 http://okopnik.com http://twitter.com/okopnik

Message body is not shown because sender requested not to inline it.

Show quoted text
> Running the example script (eg/example1.pl) after enabling warnings > throws a large number of errors:
no, enabling warnings generates "warning messages", not "errors". this module does not ship with warnings enabled, so if you are seeing warnings, they are being turned on by something else. search your code for things like "use warnings" or "perl -w". figure out who added this, and have them removed. ==> this is not a Term::Pager issue.
Subject: Re: [rt.cpan.org #64346] Term::Pager bugs and patch
Date: Thu, 30 Dec 2010 15:15:35 -0500
To: Jeff Weisberg via RT <bug-Term-Pager [...] rt.cpan.org>
From: Ben Okopnik <ben [...] okopnik.com>
On Thu, Dec 30, 2010 at 02:57:10PM -0500, Jeff Weisberg via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=64346 > >
> > Running the example script (eg/example1.pl) after enabling warnings > > throws a large number of errors:
> > no, enabling warnings generates "warning messages", not "errors".
Wow, thanks for educating me. I've been feeling under-served in the pointless word games department, and you've just filled up that requirement for the next year. Show quoted text
> this module does not ship with warnings enabled, so if you are seeing warnings, > they are being turned on by something else. > > search your code for things like "use warnings" or "perl -w". figure out who > added this, and have them removed. > > ==> this is not a Term::Pager issue.
The fact that your code isn't '-w'-clean isn't a Term::Pager issue??? ...oh, wait - of course, you're right: it's an incompetent programmer issue. Thanks so much for your time; I won't be bothering you again. -- * Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *