diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-17 11:35:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-17 11:35:57 +0000 |
commit | 6e2837dcdd4dff544631e3957ec57e91481a5490 (patch) | |
tree | 2ab143c601ca3b689c03f2f0adc8f0b7fe7264bc /MDK/Common/String.pm | |
parent | 31f9e7d6a3cfc40d38edb6bc8721b3048e7b3c15 (diff) | |
download | perl-MDK-Common-6e2837dcdd4dff544631e3957ec57e91481a5490.tar perl-MDK-Common-6e2837dcdd4dff544631e3957ec57e91481a5490.tar.gz perl-MDK-Common-6e2837dcdd4dff544631e3957ec57e91481a5490.tar.bz2 perl-MDK-Common-6e2837dcdd4dff544631e3957ec57e91481a5490.tar.xz perl-MDK-Common-6e2837dcdd4dff544631e3957ec57e91481a5490.zip |
perl_checker compliance
Diffstat (limited to 'MDK/Common/String.pm')
-rw-r--r-- | MDK/Common/String.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/MDK/Common/String.pm b/MDK/Common/String.pm index bf8ac90..2325623 100644 --- a/MDK/Common/String.pm +++ b/MDK/Common/String.pm @@ -132,15 +132,14 @@ sub formatAlaTeX { sub warp_text { - my ($text, $width) = @_; - $width ||= 80; + my ($text, $o_width) = @_; my @l; foreach (split "\n", $text) { my ($beg) = /^(\s*)/; my $t = ''; foreach (split /\s+/, $_) { - if (length "$beg$t $_" > $width) { + if (length "$beg$t $_" > ($o_width || 80)) { push @l, "$beg$t"; $beg = ''; $t = $_; |