From: Karen Etheridge Date: Wed, 13 Mar 2013 19:04:12 +0000 (-0700) Subject: fix documentation of type heirarchy X-Git-Tag: 2.0800~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=b8d7a95f57f36d24ad4d15ffd6f4ca195f4d5eaf fix documentation of type heirarchy - Item (and everything else) is a subtype of Any - FileHandle is not a GlobRef, just another Ref --- diff --git a/lib/Moose/Manual/Types.pod b/lib/Moose/Manual/Types.pod index 1b7d873..1b54e65 100644 --- a/lib/Moose/Manual/Types.pod +++ b/lib/Moose/Manual/Types.pod @@ -34,26 +34,26 @@ data, and it also contributes greatly to code maintainability. The basic Moose type hierarchy looks like this Any - Item - Bool - Maybe[`a] - Undef - Defined - Value - Str - Num - Int - ClassName - RoleName - Ref - ScalarRef[`a] - ArrayRef[`a] - HashRef[`a] - CodeRef - RegexpRef - GlobRef + Item + Bool + Maybe[`a] + Undef + Defined + Value + Str + Num + Int + ClassName + RoleName + Ref + ScalarRef[`a] + ArrayRef[`a] + HashRef[`a] + CodeRef + RegexpRef + GlobRef FileHandle - Object + Object In practice, the only difference between C and C is conceptual. C is used as the top-level type in the hierarchy. diff --git a/lib/Moose/Util/TypeConstraints.pm b/lib/Moose/Util/TypeConstraints.pm index b44a0eb..15d95f3 100644 --- a/lib/Moose/Util/TypeConstraints.pm +++ b/lib/Moose/Util/TypeConstraints.pm @@ -832,26 +832,26 @@ This module also provides a simple hierarchy for Perl 5 types, here is that hierarchy represented visually. Any - Item - Bool - Maybe[`a] - Undef - Defined - Value - Str - Num - Int - ClassName - RoleName - Ref - ScalarRef[`a] - ArrayRef[`a] - HashRef[`a] - CodeRef - RegexpRef - GlobRef - FileHandle - Object + Item + Bool + Maybe[`a] + Undef + Defined + Value + Str + Num + Int + ClassName + RoleName + Ref + ScalarRef[`a] + ArrayRef[`a] + HashRef[`a] + CodeRef + RegexpRef + GlobRef + FileHandle + Object B Any type followed by a type parameter C<[`a]> can be parameterized, this means you can say: