- Item (and everything else) is a subtype of Any
- FileHandle is not a GlobRef, just another Ref
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<Any> and C<Item> is
conceptual. C<Item> is used as the top-level type in the hierarchy.
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<NOTE:> Any type followed by a type parameter C<[`a]> can be
parameterized, this means you can say: