You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If max_width is smaller than the "expected" width the calculation of the linebreak hangs in an infinite loop.
Running this script with debugger reveals that the condition in line Term::Table::LineBreak:54 is never matched. This causes the @parts array to grow instead of shrink.
This issue was produced on:
AIX with Perl 5.14.2 and Term::Table 0.012
Centos 7, Perl 5.16.3 and Term::Table 0.012
For testing: Change the max_width parameter to 12 will cause no harm.
#!/usr/bin/env perluse warnings FATAL=>'all';
use strict;
use Term::Table;
my@rows;
my@cols = 1..1;
push(@rows, \@cols) for 1..1;
my$table = Term::Table->new(max_width=> 11, collapse=> 0, rows=> \@rows);
print"$_\n"for$table->render;
The text was updated successfully, but these errors were encountered:
* Throw exception if table cannot fit in bounds
* Allow override of that exception via allow_overflow
* Allow control over 'arbitrary' padding, but keep default for legacy
* Fix off-by-one error when calculating the border (accidentally dded 3 columns)
* Document new parameters
released a new version that fixes this issue. Fixing this issue required adding an exception, and a way to override the exception. It also lead me to expose some un-documented padding that was going on. Finally I found an off-by-1 error in the border calculation, I have fixed that as well.
If
max_width
is smaller than the "expected" width the calculation of the linebreak hangs in an infinite loop.Running this script with debugger reveals that the condition in line
Term::Table::LineBreak:54
is never matched. This causes the@parts
array to grow instead of shrink.This issue was produced on:
For testing: Change the
max_width
parameter to 12 will cause no harm.The text was updated successfully, but these errors were encountered: