Subject: | infinite loop for small widths of column |
When I run this code:
perl -e 'use Text::SimpleTable; my $table = Text::SimpleTable->new( [ 2,
'Plugin' ], )'
it works nicely. exits.
but when I run this:
perl -e 'use Text::SimpleTable; my $table = Text::SimpleTable->new( [ 1,
'Plugin' ], )'
the code enters some infinite loop, and eats all of memory.
It seems to be that the loop is in _wrap function, in here:
while (length $part > $width) {
my $subtext;
$subtext = substr $part, 0, $width - length($WRAP), '';
push @cache, "$subtext$WRAP";
}
Unfortunately I can't debug it more due to project time constraints, but
I thought that it's better that you know about it.