diff options
author | Eric Wong <e@yhbt.net> | 2020-03-21 05:24:32 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-21 05:43:54 +0000 |
commit | 97a5c2d18eb597b09c98c9ac3d0b91ef9f79294b (patch) | |
tree | a3f53fb639be2f0346a0c91dcd9d44a19230062d /t | |
parent | 9ba72fb4d832390eac423e25e6734a9b21086322 (diff) | |
download | public-inbox-97a5c2d18eb597b09c98c9ac3d0b91ef9f79294b.tar.gz |
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.
Diffstat (limited to 't')
-rw-r--r-- | t/www_listing.t | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/t/www_listing.t b/t/www_listing.t index 39c19577..9230329c 100644 --- a/t/www_listing.t +++ b/t/www_listing.t @@ -9,8 +9,10 @@ use PublicInbox::TestCommon; require_mods(qw(URI::Escape Plack::Builder Digest::SHA IO::Compress::Gzip IO::Uncompress::Gunzip HTTP::Tiny)); require PublicInbox::WwwListing; -my $json = $PublicInbox::WwwListing::json or - plan skip_all => "JSON module missing"; +my $json = do { + no warnings 'once'; + $PublicInbox::WwwListing::json; +} or plan skip_all => "JSON module missing"; use_ok 'PublicInbox::Git'; |