|Subject:||PDF::Table::table enters a never ending loop|
|Date:||Wed, 12 Mar 2008 12:34:12 +0200|
|To:||bug-PDF-Table [...] rt.cpan.org|
|From:||Petri Kaurinkoski <Petri.Kaurinkoski [...] iki.fi>|
Dear Sirs, I have been working with a perl-program using PDF::Table. I encountered a problem with the table-subroutine entering a never ending loop at the point where long words are split to shorter ones. I looked at the code, and discovered the problem in the exit condition for the loop. I fixed the problem by replacing the whole loop-structure with one global replace-regexp statement. I ask you to consider including my patch (attached) to the PDF::Table v. 0.9.3. I think the new implemetation is even more efficient than the original one as there is no explicit loop in the code. also, I added statement modifier testing whether the desired maximum word length is greater than 0 While tracking down the bug, I discovered that the problem was caused by non-empty $2 at the point where PDF::Table::table was called. A workaround was to do a dummy match $_ =~ m/./; just before the call and thus reset $2. Best regards, Petri Kaurinkoski -- Petri Kaurinkoski <Petri.Kaurinkoski@iki.fi>
Message body is not shown because sender requested not to inline it.