Skip Menu |

This queue is for tickets about the HTML-Paginator CPAN distribution.

Report information
The Basics
Id: 1888
Status: new
Priority: 0/
Queue: HTML-Paginator

People
Owner: Nobody in particular
Requestors: captvanhalen [...] yahoo.com
Cc:
AdminCc:

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



Subject: bug in Paginator.pm
I just downloaded the module and tried to run the synopsis and received this error: Can't call method "_Prep_HTML_Text" on unblessed reference at /usr/lib/perl5/site_perl/5.6.0/HTML/Paginator.pm line 17. The problem is inside the new method - $obj->_Prep_HTML_Text is called before $obj is even blessed. Simple fix, just move the line that blesses $obj before the call to _Prep_HTML_Text. Attached is a diff file for you convenience. Have a good one. :) jeffa
*** Paginator.pm Wed Jun 5 03:02:26 2002 --- /usr/lib/perl5/site_perl/5.6.0/HTML/Paginator.pm Mon Dec 23 10:58:45 2002 *************** *** 14,19 **** --- 14,20 ---- item_name => 'result', seperator => ' | ', href_link => $ENV{REQUEST_URI} }}; + bless $obj, ref $pkg || $pkg; $obj->_Prep_HTML_Text; if ($obj->{html}->{href_link} =~ /&page\=\d+&/) { $obj->{html}->{href_link} =~ s/&page\=\d+&/&/g; *************** *** 41,47 **** and $obj->{num_per_page} > 0 or return undef; # must have at least one item per page $obj->{book} = \@_; - bless $obj, ref $pkg || $pkg; $obj->_Ginsoo; return $obj; } --- 42,47 ----