# New Ticket Created by Zoffix Znet # Please include the string: [perl #127359] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127359 >
In the first example blow, passing a named "foo" argument after a comma generates the "Unexpected named param passed..." warning and the $foo variable inside my multi is empty. Note that "meow" *was* printed, showing my custom sub was indeed called. In the second example, we did not use a comma before the named "foo" argument; we're still getting the "Unexpected param" warning, but now our multi is not called. Expected behaviour for both cases is our defined multi is called and the :foo argument is passed in as the named $foo parameter. <ZoffixWin> m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say say 42 + 1, :foo<42>; <camelia> rakudo-moar d67cb0: OUTPUT«Use of uninitialized value $foo of type Any in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in sub infix:<+> at /tmp/OT3Cjm5qF9 line 1meow <>Unexpected named parameter 'foo' passed in block <un…» <ZoffixWin> m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say 42 + 1 :foo<42>; <camelia> rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'foo' passed in block <unit> at /tmp/0eAa6uTt5N line 1»