]> git.donarmstrong.com Git - debbugs.git/commitdiff
older versions of List::Util (<1.26) do not have sum0; just use sum
authorDon Armstrong <don@donarmstrong.com>
Sun, 2 Jul 2017 18:58:12 +0000 (11:58 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 2 Jul 2017 18:58:12 +0000 (11:58 -0700)
Debbugs/CGI/Bugreport.pm

index ce1bd30d8395110b8c185ea22379ec0276a2b3d1..02b019729485df69ef8d5c84388664abfed84524 100644 (file)
@@ -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";
         }