Clearing table states
Tim Rushing <[email protected]> Sun, 26 Oct 2003 22:57:44 -0600
| Newsgroups | gmane.comp.lang.perl.modules.html-tableextract |
|---|---|
| Message-ID | <[email protected]> |
I'm in the process of prototyping code that is going to run through around
50,000 files, each containing data in a single html table. I like
HTML::TableExtract and would like to use it. However, I am running into a
problem. It appears that despite my best efforts, I cannot destroy a
TableExtract object or clear out its TableState objects.
Instead it appears that as I loop through my files the TableExtract object
is continually adding new TableStates. I have tried declaring the variable
using
my $te = new HTML::TableExtract( depth=>0, count=>0, gridmap=>0)
buried inside a loop that is inside the loop that reads the files
in--hoping that it would be destroyed when my code exited the loop.
I have tried explicitly calling the $te->DESTROY method at the bottom of my
loop. This does not generate any errors, but doesn't seem to do anything.
I've only played with about 100 files so far, and each time through the
loop, it is progressively slower.
I suppose I could write code to create separate perl scripts using just a
few tables at a time and then call those scripts--but I'm hoping I've
missed something simple in the documentation.
Is there an explicit way to clear the TableState objects or to destroy and
re-instantiate the TableExtract object?
---Tim Rushing
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/