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 | |
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')
-rw-r--r-- | MDK/Common/Func.pm | 2 | ||||
-rw-r--r-- | MDK/Common/String.pm | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/MDK/Common/Func.pm b/MDK/Common/Func.pm index 7f1a926..e954a0b 100644 --- a/MDK/Common/Func.pm +++ b/MDK/Common/Func.pm @@ -322,7 +322,7 @@ sub cdie { my ($err) = @_; foreach (@MDK::Common::Func::cdie_catches) { $@ = $err; - if (my $v = &{$_}(\$err)) { + if (my $v = $_->(\$err)) { return $v; } } 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 = $_; |