I may have found a bug in Text::Wrap. I wrote a test to illuminate the situation (see below). Can anyone confirm that this is a problem in their environment? I haven't worked out the fix yet...Test Script:
Results:use Text::Wrap; local $| = 1; print "Text::Wrap info: \n"; print "Subverion: $Text::Wrap::SUBVERSION \n"; print "Version: $Text::Wrap::VERSION \n"; my @tests = ( 'the quick brown fox jumped over the lazy dog', '==============================================', ); my $columns = 28; local $Text::Wrap::columns = $columns; local $Text::Wrap::unexpand = 0; local $Text::Wrap::huge = 'wrap'; foreach my $str ( @tests ) { my $wrapped = wrap('', '', $str); chomp($wrapped); print "\n"; print "123456789|123456789|123456789|123456789|123456789|123456789|\ +n\n"; print $wrapped; print "\n-----------\n\n"; }
Text::Wrap info: Subverion: modern Version: 2012.0818 123456789|123456789|123456789|123456789|123456789|123456789| the quick brown fox jumped over the lazy dog ----------- This shouldn't happen at /usr/local/lib/perl5/5.18.0/Text/Wrap.pm line + 92.
-------------------------------------
Fred
In reply to Possible bug in Text::Wrap ??? by freddo411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |