From 66f2d185a605eb951b2871ce2d7c3ec84a7e3b8f Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 2 Jul 2017 11:58:12 -0700 Subject: [PATCH] older versions of List::Util (<1.26) do not have sum0; just use sum --- Debbugs/CGI/Bugreport.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index ce1bd30..02b0197 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -45,7 +45,7 @@ use POSIX qw(strftime); use Encode qw(decode_utf8 encode_utf8); use URI::Escape qw(uri_escape_utf8); use Scalar::Util qw(blessed); -use List::Util qw(sum0); +use List::Util qw(sum); use File::Temp; BEGIN{ @@ -279,7 +279,7 @@ sub display_entity { # if the first 20 lines in the message which have any non-space # characters are larger than 100 characters more often than they # are not, then use CSS to try to impose sensible wrapping - sum0(map {length ($_) > 100?1:-1} grep {/\S/} split /\n/,$body,20) > 0 + sum(0,map {length ($_) > 100?1:-1} grep {/\S/} split /\n/,$body,20) > 0 ) { $css_class .= " wrapping"; } -- 2.39.2