diff options
Diffstat (limited to 'lib/PublicInbox/WwwHighlight.pm')
-rw-r--r-- | lib/PublicInbox/WwwHighlight.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/WwwHighlight.pm b/lib/PublicInbox/WwwHighlight.pm index 6fed2fed..75338806 100644 --- a/lib/PublicInbox/WwwHighlight.pm +++ b/lib/PublicInbox/WwwHighlight.pm @@ -20,8 +20,7 @@ package PublicInbox::WwwHighlight; use strict; -use warnings; -use bytes (); # only for bytes::length +use v5.10.1; use parent qw(PublicInbox::HlMod); use PublicInbox::Linkify qw(); use PublicInbox::Hval qw(ascii_html); @@ -47,7 +46,7 @@ sub read_in_full ($) { return \$buf if $r == 0; $off += $r; } - $env->{'psgi.errors'}->print("input read error: $!\n"); + warn "input read error: $!"; undef; } @@ -69,7 +68,7 @@ sub call { $l->linkify_2($$bref); my $h = [ 'Content-Type', 'text/html; charset=UTF-8' ]; - push @$h, 'Content-Length', bytes::length($$bref); + push @$h, 'Content-Length', length($$bref); [ 200, $h, [ $$bref ] ] } |