[ID 20000609.002] Text::Wrap::wrap does not handle multiline strings properly
authorMilton L. Hankins <mlh@swl.msd.ray.com>
Fri, 9 Jun 2000 12:39:27 +0000 (08:39 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 Jun 2000 22:21:45 +0000 (22:21 +0000)
Message-Id: <39411DBF.A04BB1A@swl.msd.ray.com>
(plus update the version "number" of Text::Wrap)

p4raw-id: //depot/cfgperl@6278

lib/Text/Wrap.pm

index 5f95edb..04efe19 100644 (file)
@@ -6,7 +6,7 @@ require Exporter;
 @EXPORT = qw(wrap fill);
 @EXPORT_OK = qw($columns $break $huge);
 
-$VERSION = 98.112902;
+$VERSION = 2000.06292219; #GMT
 
 use vars qw($VERSION $columns $debug $break $huge);
 use strict;
@@ -33,7 +33,7 @@ sub wrap
        my $remainder = "";
 
        while ($t !~ /^\s*$/) {
-               if ($t =~ s/^([^\n]{0,$ll})($break|\Z(?!\n))//xm) {
+               if ($t =~ s/^([^\n]{0,$ll})($break|\Z(?!\n))//x) {
                        $r .= unexpand($nl . $lead . $1);
                        $remainder = $2;
                } elsif ($huge eq 'wrap' && $t =~ s/^([^\n]{$ll})//) {