|laziness, impatience, and hubris|
constraining the keys of a HashRef in Mooseby tomgracey (Beadle)
|on Aug 29, 2013 at 14:48 UTC||Need Help??|
tomgracey has asked for the
wisdom of the Perl Monks concerning the following question:
What is the easiest way to constrain the keys of a HashRef in Moose?
I have been looking through the various type constraint modules in Moose (for the first time!) and am feeling a little overwhelmed.
I initially thought of something on the lines of
but then if I run the following script:
it runs through to completion without any problem, thus not appearing to contrain either the keys or the values
Obviously I have no idea what I am doing! Any thoughts?