Skip Menu |

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

Report information
The Basics
Id: 19668
Status: resolved
Priority: 0/
Queue: HTML-TableExtract

People
Owner: MSISK [...] cpan.org
Requestors: DDICK [...] cpan.org
Cc:
AdminCc:

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



Subject: throws exception with 'use HTML::TableExtract();'. Patch included
the *TREE trickery relies on the ->import method being called. when it is not called, as in 'use HTML::TableExtract();', bad things happen. patch includes a test case.
Subject: html_tableextract_use.patch
diff -Naur old/lib/HTML/TableExtract.pm new/lib/HTML/TableExtract.pm --- old/lib/HTML/TableExtract.pm 2006-05-03 16:32:54.000000000 +1000 +++ new/lib/HTML/TableExtract.pm 2006-06-03 12:32:21.000000000 +1000 @@ -23,6 +23,10 @@ # default HTML::Parser. (use HTML::TableExtract qw(tree);) Also installs # a mode constant TREE(). +BEGIN { + *TREE = sub { 0 }; +} + sub import { my $class = shift; no warnings; diff -Naur old/t/10_bulk.t new/t/10_bulk.t --- old/t/10_bulk.t 2006-06-03 12:35:44.000000000 +1000 +++ new/t/10_bulk.t 2006-06-03 12:46:52.000000000 +1000 @@ -10,7 +10,7 @@ my $file = "$Dat_Dir/ugly.html"; -use HTML::TableExtract; +use HTML::TableExtract(); # by bulk, lineage integrity my $label = 'by bulk with lineage check';
Thanks for the patch. Look for a fix in 2.09 Cheers, Matt