Subject: | Infinite loop |
This code:
use Text::Flowed 'reformat';
$^W = 1;
print reformat( ' >'.('a' x 100) );
makes the while loop, starting at line 73, infinite, producing the
warning "Use of uninitialized value in concatenation (.) or string at
.../Text/Flowed.pm line 91." at each iteration.
I believe that removing the question mark from the regex at line 87,
making the first capturing parentheses non-optional, may be an
appropriate fix.
$line =~ /^(.{$min,})? (.*)/
-------------------------^