4 # hide Cpanel::JSON::XS
6 my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} );
7 sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh }
8 } qw{Cpanel/JSON/XS.pm};
13 unless ( eval { require JSON::XS; 1 } ) {
14 plan skip_all => 'No JSON::XS';
17 diag 'Using JSON::XS ', JSON::XS->VERSION;
19 is( JSON, 'JSON::XS', 'Correct JSON class' );
21 is( \&encode_json, \&JSON::XS::encode_json, 'Correct encode_json function' );
22 is( \&decode_json, \&JSON::XS::decode_json, 'Correct encode_json function' );
24 require 't/lib/is_bool.pm';