Object.dclone() makes a deep clone of any mutable object and returns it to the caller.
classT(value) { method display { say value }}classS(value) <T { method display { say value }}var obj1 =T("T")var obj2 =S("S")var obj3 = obj2.dclone# make a deep clone of obj2obj1.value="foo"# change the value of obj1obj2.value="bar"# change the value of obj2obj1.display# prints "foo"obj2.display# prints "bar"obj3.display# prints "S"