X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FCGI%2FBugreport.pm;h=02b019729485df69ef8d5c84388664abfed84524;hb=66f2d185a605eb951b2871ce2d7c3ec84a7e3b8f;hp=ce1bd30d8395110b8c185ea22379ec0276a2b3d1;hpb=f3d363c90dc8253057b4ac91b78690b5b28a95b0;p=debbugs.git 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"; }