The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more
123456789101112131415161718 use strict;use Test::More;BEGIN { require 't/base.include' }SKIP: { eval { require JSON; JSON->import(qw/decode_json/); }; skip "JSON not installed", 1 if $@; my $dump = p( decode_json(input) ); is( $dump, expected, "whatever's powering JSON, it works" );}done_testing;
use
strict;
Test::More;
BEGIN {
require
't/base.include'
}
SKIP: {
eval
{
JSON;
JSON->
import
(
qw/decode_json/
);
};
skip
"JSON not installed"
, 1
if
$@;
my
$dump
= p( decode_json(input) );
is(
, expected,
"whatever's powering JSON, it works"
done_testing;