|
|
| <prev next> |
Choosing A Webhost: |
Robustness patch: msg#00002lang.perl.modules.html-tableextract
This patch fixes a crash in HTML::TableExtract when some entries in the object hash are missing. I realize that the crash should not have occurred, and probably indicate some deeper bug which needs to be fixed. However I hope that this patch, providing a more detailed error message, will be a step along the way to fixing the bug. I haven't yet made a test case to reproduce the bug, but if I come across it again I will send one to this list. table-extract-general@xxxxxxxxxxxxxxxxxxxxxx --- HTML-TableExtract-1.08/lib/HTML/TableExtract.pm +++ HTML-TableExtract-1.08-new/lib/HTML/TableExtract.pm @@ -205,7 +205,15 @@ $table = $self->first_table_found; } return () unless ref $table; + if (not defined $self->{_table_mapback}) { + warn 'cannot find my _table_mapback hash'; + return (); + } my $ts = $self->{_table_mapback}{$table}; + if (not defined $ts) { + warn "cannot find $table in my _table_mapback hash"; + return (); + } $ts->rows; } -- Ed Avis <ed@xxxxxxxxxxx> ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | TableExtract is (extremely) slow vs regexp??, YANDEX |
|---|---|
| Previous by Thread: | TableExtract is (extremely) slow vs regexp??, YANDEX |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |