class MyClass { has $.length is rw; has $.height is rw; has $.color is rw; method my_method ( Array $list, %opt? ) { if %opt.defined { for %opt.pairs { self."{.key}"() = .value; # self."{.key}"() := .value; Nee... } } } } my $n = MyClass.new(); $n.my_method( [ 1, 2, 3 ], { length => 10, height => 6, color => 'green' }); say $n.perl;