{"body":"MacBookProRetinaFCO:Injector fernando$ perl6 -e '\n\n\nmulti trait_mod:<is>(Attribute \\attr, :$chainable!) is export {\n        my \\clazz       = attr.package;\n        my \\type        = attr.type;\n        my $meth;       \n        if $chainable ~~ Str {\n                $meth = $chainable;\n        } else {\n                $meth   = \"set-\" ~ attr.name.substr(2);\n        }\n        note \"creating $meth\";\n        clazz.^add_multi_method($meth, method (\\value where * ~~ type) {\n                attr.set_value(self, value);\n                self\n        });     \n        clazz.^compose;\n}\n\nclass Bla {\n   has $.ble is chainable;\n   has $.bli is chainable; #<blablabla>;\n}                                   \n                        \nmy $o = Bla.new;\n$o.ble.say;                        \n$o.set-ble(1234).say;\n$o.ble.say;                                            \n$o.set-ble(456).ble.say;\n\n'\ncreating set-ble\ncreating set-bli\n(Any)\nP6opaque: no such attribute '$!bli'\n  in block <unit> at -e line 28\n\nMacBookProRetinaFCO:Injector fernando$","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/19SqhrnQ","modified":1457188696,"id":"19SqhrnQ","size":1030,"lines":39,"own_paste":false,"theme":"","date":1457188696}