HEX
Server: Apache
System: Linux server-674799.igrow.ws 5.14.0-611.30.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 11 06:42:00 EST 2026 x86_64
User: elrashedytravel (1025)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/.cpan/build/JSON-4.10-0/t/e90_misc.t
use strict;
use Test::More tests => 4;

BEGIN {
    $ENV{ PERL_JSON_BACKEND } ||= 'JSON::backportPP';
}

use JSON;

# reported by https://rt.cpan.org/Public/Bug/Display.html?id=68359

eval { JSON->to_json( 5, { allow_nonref => 1 } ) };
ok($@);

is( q{"5"}, JSON::to_json( "5", { allow_nonref => 1 } ) );
is( q{5},  JSON::to_json( 5, { allow_nonref => 1 } ) );
is( q{"JSON"}, JSON::to_json( 'JSON', { allow_nonref => 1 } ) );