From: Stevan Little Date: Fri, 16 Mar 2007 20:02:04 +0000 (+0000) Subject: adding list_all_type_constraints for phaylon X-Git-Tag: 0_19~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1e01e3c58b5008a7faf9566b546f5d1ba9f6aa8;p=gitmo%2FMoose.git adding list_all_type_constraints for phaylon --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index 1018fd0..0c1270f 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -114,7 +114,9 @@ sub unimport { foreach my $constraint (keys %TYPES) { *{"${pkg}::${constraint}"} = find_type_constraint($constraint)->_compiled_type_constraint; } - } + } + + sub list_all_type_constraints { keys %TYPES } } # type constructors @@ -373,6 +375,12 @@ This will export all the current type constraints as functions into the caller's namespace. Right now, this is mostly used for testing, but it might prove useful to others. +=item B + +This will return a list of type constraint names, you can then +fetch them using C if you +want to. + =back =head2 Type Constraint Constructors