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.