Officially document sugar-free form for type and subtype where it
authorDave Rolsky <autarch@urth.org>
Sat, 21 Feb 2009 22:28:17 +0000 (22:28 +0000)
committerDave Rolsky <autarch@urth.org>
Sat, 21 Feb 2009 22:28:17 +0000 (22:28 +0000)
commit9e856c835c42b664192d2d37a0db5468153a7079
tree009aff016d5b2b56e46e878faaf5f9caebcc6085
parent9a63fabaeba45a7cad289ab21527e7470c4d569a
Officially document sugar-free form for type and subtype where it
accepts a hashref of named parameters, rather than positional params.

This preserves the safety of non-positional params, but lets you
integrate easily with other modules, for doing

  subtype( 'Foo', { where => sub_returner() } );

Added tests for this new style and made sure the docs show it too.
lib/Moose/Util/TypeConstraints.pm
t/040_type_constraints/001_util_type_constraints.t
t/200_examples/004_example_w_DCS.t