From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id AAA8B1F61C for ; Sat, 21 Mar 2020 01:10:34 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] t/www_listing: avoid 'once' warnings Date: Sat, 21 Mar 2020 01:10:34 +0000 Message-Id: <20200321011034.3731-3-e@yhbt.net> In-Reply-To: <20200321011034.3731-1-e@yhbt.net> References: <20200321011034.3731-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: We reach into the WwwListing package directly to retrieve that JSON encoder/decoder object, and we can't rely on `use' since WwwListing loading may fail if Plack is missing. --- t/www_listing.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/www_listing.t b/t/www_listing.t index 39c19577..1b29dd88 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -8,7 +8,7 @@ use PublicInbox::Spawn qw(which); use PublicInbox::TestCommon; require_mods(qw(URI::Escape Plack::Builder Digest::SHA IO::Compress::Gzip IO::Uncompress::Gunzip HTTP::Tiny)); -require PublicInbox::WwwListing; +use PublicInbox::WwwListing; my $json = $PublicInbox::WwwListing::json or plan skip_all => "JSON module missing";