From: Jesse Luehrs Date: Mon, 14 Sep 2009 05:19:31 +0000 (-0500) Subject: expand on the descriptions for the built-in type constraints X-Git-Tag: 0.90~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f91b2a92910e4c8661b3cadd2b5cc7627fe5296f;p=gitmo%2FMoose.git expand on the descriptions for the built-in type constraints --- diff --git a/lib/Moose/Manual/Types.pod b/lib/Moose/Manual/Types.pod index d4f5579..e8313c3 100644 --- a/lib/Moose/Manual/Types.pod +++ b/lib/Moose/Manual/Types.pod @@ -57,9 +57,24 @@ The basic Moose type hierarchy looks like this In practice, the only difference between C and C is conceptual. C is used as the top-level type in the hierarchy. -The rest of these types correspond to existing Perl concepts. For -example, a C is anything that Perl thinks looks like a number, an -C is a blessed reference, etc. +The rest of these types correspond to existing Perl concepts. +In particular: + +=over 4 + +=item C accepts C<1> for true, and any value that perl treats as false for false. + +=item C accepts either C<`a> or C. + +=item C accepts anything that perl thinks looks like a number (see L). + +=item C and C accept strings that are either a the name of a class or the name of a role. The class/role must be loaded beforehand for this to succeed. + +=item C accepts either an object of type L or a builtin perl filehandle (see L). + +=item C accepts any blessed reference. + +=back The types followed by "[`a]" can be parameterized. So instead of just plain C we can say that we want C instead. We