]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ensure bytes::length is available to callers
authorEric Wong <e@80x24.org>
Wed, 13 Feb 2019 22:44:42 +0000 (22:44 +0000)
committerEric Wong <e@80x24.org>
Wed, 13 Feb 2019 22:55:11 +0000 (22:55 +0000)
We were relying on Danga::Socket using the "bytes" pragma,
previously.  Nowadays, the "bytes" pragma is not recommended in
general, but bytes::length remains acceptable for getting the
byte-size of a scalar.

lib/PublicInbox/HTTP.pm
lib/PublicInbox/View.pm
lib/PublicInbox/ViewVCS.pm
lib/PublicInbox/WWW.pm
lib/PublicInbox/WwwAttach.pm
lib/PublicInbox/WwwHighlight.pm
lib/PublicInbox/WwwText.pm
t/psgi_search.t
t/search-thr-index.t

index 9657b31a894ee5ebec9faa9cb1d701a4b45298f0..e73bd810af39ab86075931c195b3ea254fff83b8 100644 (file)
@@ -12,6 +12,7 @@ use strict;
 use warnings;
 use base qw(Danga::Socket);
 use fields qw(httpd env rbuf input_left remote_addr remote_port forward pull);
+use bytes (); # only for bytes::length
 use Fcntl qw(:seek);
 use Plack::HTTPParser qw(parse_http_request); # XS or pure Perl
 use HTTP::Status qw(status_message);
index e64c965ba48c04dabac78a1a7699622f11d90888..429eba863d534268c620a15aa555d8d22af0fc65 100644 (file)
@@ -6,6 +6,7 @@
 package PublicInbox::View;
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use PublicInbox::MsgTime qw(msg_datestamp);
 use PublicInbox::Hval qw/ascii_html obfuscate_addrs/;
 use PublicInbox::Linkify;
index f6a769427dfae230a1bd9a3261063768852af999..f5374517a7f12fcdf440fd3487bdc35f9e264416 100644 (file)
@@ -16,6 +16,7 @@
 package PublicInbox::ViewVCS;
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use PublicInbox::SolverGit;
 use PublicInbox::WwwStream;
 use PublicInbox::Linkify;
index 406802a95767f409f49fb2247ee8e52e7328e512..cbaf88450ca8548c513abb9bdd85e8da16b2cd65 100644 (file)
@@ -14,6 +14,7 @@ package PublicInbox::WWW;
 use 5.008;
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use PublicInbox::Config;
 use PublicInbox::Hval;
 use URI::Escape qw(uri_unescape);
index b1504f526725286b671074beadced88a9be996a9..d690ce411921b5fa40820b98923b53d23c1f001a 100644 (file)
@@ -5,6 +5,7 @@
 package PublicInbox::WwwAttach; # internal package
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use Email::MIME::ContentType qw(parse_content_type);
 use PublicInbox::MIME;
 use PublicInbox::MsgIter;
index 09fc48aba0c1bce2f43a26e51c460dbe91483bb0..0191640182461b1f752158e856aa6d5ba3efc643 100644 (file)
@@ -21,6 +21,7 @@
 package PublicInbox::WwwHighlight;
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use HTTP::Status qw(status_message);
 use parent qw(PublicInbox::HlMod);
 
index adadc37aab3da1f32ee40a7eb0687444281b9696..f42f3595fd6578d49f07b8527c45503f56467c48 100644 (file)
@@ -5,6 +5,7 @@
 package PublicInbox::WwwText;
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use PublicInbox::Linkify;
 use PublicInbox::WwwStream;
 use PublicInbox::Hval qw(ascii_html);
index a057a994f3cbe38f17962c59e8c4e7d1f7a9c7ca..da6cc682004b33dadab7266adfbf20b25c090db8 100644 (file)
@@ -7,6 +7,7 @@ use File::Temp qw/tempdir/;
 use Email::MIME;
 use PublicInbox::Config;
 use PublicInbox::WWW;
+use bytes (); # only for bytes::length
 my @mods = qw(PublicInbox::SearchIdx HTTP::Request::Common Plack::Test
                URI::Escape Plack::Builder);
 foreach my $mod (@mods) {
index ab6d1b0fb8ae3020dd01b2fb13c9dfe397bb0cf0..ed3e4e76278f7126459dfb3940cf280dea9d0b5e 100644 (file)
@@ -2,6 +2,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 use strict;
 use warnings;
+use bytes (); # only for bytes::length
 use Test::More;
 use File::Temp qw/tempdir/;
 use PublicInbox::MID qw(mids);