From: Don Armstrong Date: Sun, 2 Jul 2017 18:58:12 +0000 (-0700) Subject: older versions of List::Util (<1.26) do not have sum0; just use sum X-Git-Tag: release/2.6.0~110 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=66f2d185a605eb951b2871ce2d7c3ec84a7e3b8f older versions of List::Util (<1.26) do not have sum0; just use sum --- 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"; }