summaryrefslogtreecommitdiff
path: root/t/52_object.t
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2022-07-19 16:23:48 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2022-07-19 16:23:48 +0900
commit80e2994434f3c840ce12546351ab9fd20cdd3aaa (patch)
tree41233a85d8b0d8eed84e25c4c28c6bd1cea4098b /t/52_object.t
parent8d2a41273a56a33a291d292c1fbee03cce290694 (diff)
downloadperl-json-80e2994434f3c840ce12546351ab9fd20cdd3aaa.tar.gz
perl-json-80e2994434f3c840ce12546351ab9fd20cdd3aaa.tar.bz2
perl-json-80e2994434f3c840ce12546351ab9fd20cdd3aaa.zip
Imported Upstream version 4.03upstream/4.03
Diffstat (limited to 't/52_object.t')
-rw-r--r--t/52_object.t15
1 files changed, 13 insertions, 2 deletions
diff --git a/t/52_object.t b/t/52_object.t
index 1acf5ea..212f741 100644
--- a/t/52_object.t
+++ b/t/52_object.t
@@ -1,6 +1,17 @@
# copied over from JSON::XS and modified to use JSON
+package JSON::freeze;
+
+1;
+
+package JSON::tojson;
+
+1;
+
+package main;
+
use strict;
+use warnings;
use Test::More;
BEGIN { $^W = 0 } # hate
@@ -52,8 +63,8 @@ sub JSON::freeze::THAW {
777
}
-my $obj = bless { k => 1 }, JSON::freeze::;
-my $enc = $json->encode ($obj);
+$obj = bless { k => 1 }, JSON::freeze::;
+$enc = $json->encode ($obj);
ok ($enc eq '("JSON::freeze")[3,1,2]');
my $dec = $json->decode ($enc);