On 09/28/2017 09:11 PM, Brandon Allbery wrote:
On Fri, Sep 29, 2017 at 12:05 AM, ToddAndMargo <toddandma...@zoho.com <mailto:toddandma...@zoho.com>> wrote:

    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?


That's just one example. I would expect something like this to work:

     sub foo(%bar (:length($)!, :width($)!)) {

which gives you the named one (instead of using the anonymous hash to suppress it) and should test for requred keys while discarding their (separated) values. Or you can use named variables instead f the $ placeholders if you actually want them.

Note, I am not sure what actually happens with the :$x etc. in the original; it might be necessary to destructure those as ($ => $) or something.

Thank you . I will put in my docs as a "maybe".

:-)

Reply via email to