Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 7, 2019 16:12
Show Gist options
  • Save Whateverable/5d86bbfd75983b40250804d5ea88505b to your computer and use it in GitHub Desktop.
Save Whateverable/5d86bbfd75983b40250804d5ea88505b to your computer and use it in GitHub Desktop.
evalable6
sub a(:$foo [+@foos]) { say @foos.perl }; a(foo => [1, 2]); a(foo => 3)
(exit code 1)
[1, 2]
Cannot unpack or Capture `3`.
To create a Capture, add parentheses: \(...)
If unpacking in a signature, perhaps you needlessly used parentheses? -> ($x) {} vs. -> $x {}
or missed `:` in signature unpacking? -> &c:(Int) {}
in sub a at /tmp/hfk2QB4oHX line 1
in block <unit> at /tmp/hfk2QB4oHX line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment