* [PATCH] ensure bytes::length is available to callers
@ 2019-02-13 22:56 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2019-02-13 22:56 UTC (permalink / raw)
To: meta
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 | 1 +
lib/PublicInbox/View.pm | 1 +
lib/PublicInbox/ViewVCS.pm | 1 +
lib/PublicInbox/WWW.pm | 1 +
lib/PublicInbox/WwwAttach.pm | 1 +
lib/PublicInbox/WwwHighlight.pm | 1 +
lib/PublicInbox/WwwText.pm | 1 +
t/psgi_search.t | 1 +
t/search-thr-index.t | 1 +
9 files changed, 9 insertions(+)
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 9657b31..e73bd81 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -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);
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e64c965..429eba8 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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;
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index f6a7694..f537451 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -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;
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 406802a..cbaf884 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -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);
diff --git a/lib/PublicInbox/WwwAttach.pm b/lib/PublicInbox/WwwAttach.pm
index b1504f5..d690ce4 100644
--- a/lib/PublicInbox/WwwAttach.pm
+++ b/lib/PublicInbox/WwwAttach.pm
@@ -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;
diff --git a/lib/PublicInbox/WwwHighlight.pm b/lib/PublicInbox/WwwHighlight.pm
index 09fc48a..0191640 100644
--- a/lib/PublicInbox/WwwHighlight.pm
+++ b/lib/PublicInbox/WwwHighlight.pm
@@ -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);
diff --git a/lib/PublicInbox/WwwText.pm b/lib/PublicInbox/WwwText.pm
index adadc37..f42f359 100644
--- a/lib/PublicInbox/WwwText.pm
+++ b/lib/PublicInbox/WwwText.pm
@@ -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);
diff --git a/t/psgi_search.t b/t/psgi_search.t
index a057a99..da6cc68 100644
--- a/t/psgi_search.t
+++ b/t/psgi_search.t
@@ -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) {
diff --git a/t/search-thr-index.t b/t/search-thr-index.t
index ab6d1b0..ed3e4e7 100644
--- a/t/search-thr-index.t
+++ b/t/search-thr-index.t
@@ -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);
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-13 22:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13 22:56 [PATCH] ensure bytes::length is available to callers Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).