On 09/28/2017 08:56 PM, Brandon Allbery wrote:
On Thu, Sep 28, 2017 at 11:52 PM, ToddAndMargo <toddandma...@zoho.com
<mailto:toddandma...@zoho.com>> wrote:
I see that SayHash(%H) will take any hash I send it.
Is there a way to make the compiler pissed if a sub does not see
the specific keys int he hash it wants? Or do I need to use loop
with ":exists" and test each key?
You should be able to use a destructuring signature
(https://docs.perl6.org/type/Signature#index-entry-destructuring_arguments_%28Signature%29)
Hi Brandon,
on this:
sub all-dimensions(% (:length(:$x), :width(:$y), :depth(:$z))) {
$x andthen $y andthen $z andthen True
}
it turn my hash into single variables. Is there a way to
test if the right keys are present and keep my hash afterwards?
-T