Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this one returns an error when I'm running it:
- sub m1(%h(:$arg1?, :$arg2?)) {
- say %h;
- }
- m1(arg1 => "some arg1"); # => "Too few positionals passed; expected 1 argument but got 0 in sub m1"
- When I remove the whitespace:
- sub m1(%h(:$arg1?, :$arg2?)) {
- say %h;
- }
- it returns the error "Shape declaration with () is reserved; please use whitespace if you meant a subsignature for unpacking, or use the :() form if you meant to add signature info"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement