]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStatic.pm
get rid of unnecessary bytes::length usage
[public-inbox.git] / lib / PublicInbox / WwwStatic.pm
index 051d2e039b979f3f8b73a6b7aafe4b9f5a0d3d6f..b3476ab82e0922eb9c8f99ca5690016a30806571 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # This package can either be a PSGI response body for a static file
@@ -9,8 +9,8 @@
 # functionality of nginx.
 package PublicInbox::WwwStatic;
 use strict;
+use v5.10.1;
 use parent qw(Exporter);
-use bytes ();
 use Fcntl qw(SEEK_SET O_RDONLY O_NONBLOCK);
 use POSIX qw(strftime);
 use HTTP::Date qw(time2str);
@@ -318,7 +318,7 @@ sub dir_response ($$$) {
                "</head><body><pre>Index of $path_info_html</pre><hr><pre>\n");
        $gzf->zmore(join("\n", @entries));
        my $out = $gzf->zflush("</pre><hr></body></html>\n");
-       $h->[3] = bytes::length($out);
+       $h->[3] = length($out);
        [ 200, $h, [ $out ] ]
 }