]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStatic.pm
wwwstatic: use sprintf for Perl <5.22 compatibility
[public-inbox.git] / lib / PublicInbox / WwwStatic.pm
index bc42236e57b6e6442db9c7351e76587f68d3d871..917049bb68fde1d49c50d1a4056d5ad9d47aaa35 100644 (file)
@@ -12,7 +12,7 @@ use strict;
 use parent qw(Exporter);
 use bytes ();
 use Fcntl qw(SEEK_SET O_RDONLY O_NONBLOCK);
-use POSIX qw(strftime lround);
+use POSIX qw(strftime);
 use HTTP::Date qw(time2str);
 use HTTP::Status qw(status_message);
 use Errno qw(EACCES ENOTDIR ENOENT);
@@ -238,7 +238,7 @@ sub human_size ($) {
                        last;
                }
        }
-       lround($size).$suffix;
+       sprintf('%lu', $size).$suffix;
 }
 
 # by default, this returns "index.html" if it exists for a given directory