http://www.perlmonks.org?node_id=1051653


in reply to Re^3: constraining the keys of a HashRef in Moose
in thread constraining the keys of a HashRef in Moose

It could mean a large number of new packages, but that doesn't necessarily mean a large number of new files. If I have a type that is only going to appear once as the field value of another type, I will frequently put the object declaration, a.k.a. the package, in the same file. This avoids the type of file proliferation you are concerned about, while still leveraging the full power of the Moose type system.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.