in reply to YAML & Objects
class Foo; has $.x; say Foo.new(:x<42>).yaml # --- !pugs/object:Foo # x: 42 [download]
To deserialize, use the eval $str :lang<yaml> builtin. (Despite its name this does not run arbitrary code.)