class C { has $.attr; submethod BUILD (:$attr = 42) { $!attr = $attr }; }; C.new.say; C.new( attr => 666 ); # 42 # 666