From: Dave Rolsky Date: Fri, 13 Feb 2009 19:28:58 +0000 (+0000) Subject: Add RoleName to docs and clarify RoleName vs Role. Also clarify what X-Git-Tag: 0.70~25 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed87d4fdb3482657a39334d3c2f43fa9569dfe3b;p=gitmo%2FMoose.git Add RoleName to docs and clarify RoleName vs Role. Also clarify what class_type and role_type do. --- diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index 6a3d183..36d7e4a 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -759,6 +759,7 @@ that hierarchy represented visually. Int Str ClassName + RoleName Ref ScalarRef ArrayRef[`a] @@ -794,6 +795,10 @@ existence check. This means that your class B be loaded for this type constraint to pass. I know this is not ideal for all, but it is a saner restriction than most others. +B The C constraint checks a string is I +which is a role, like C<'MyApp::Role::Comparable'>. The C +constraint checks that an I does the named role. + =head2 Type Constraint Naming Type name declared via this module can only contain alphanumeric @@ -870,13 +875,13 @@ L. =item B -Creates a type constraint with the name C<$class> and the metaclass -L. +Creates a new subtype of C with the name C<$class> and the +metaclass L. =item B -Creates a type constraint with the name C<$role> and the metaclass -L. +Creates a C type constraint with the name C<$role> and the +metaclass L. =item B