Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created September 7, 2019 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/9d8e601e59d0bcf04f02ba92f2aec0ad to your computer and use it in GitHub Desktop.
Save Whateverable/9d8e601e59d0bcf04f02ba92f2aec0ad 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/Cgq4tz2VTB line 1
in block <unit> at /tmp/Cgq4tz2VTB line 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment