Hi all,

I'm writing a Perl book and I'm on an introductory Moose chapter. I'm including 
the following list of types from Moose::Util::TypeConstraints:

  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

In trying to explain this, I got stuck on "Item" and "Value". I have the 
following note about them:

A word about the types in Moose::Util::TypeConstraints. "Any" means "anything"
>(duh). An "Item" is the same as "Any" and in your author's consultation with
>Moose experts, there was confusion expressed as to why these were different
>
>
>A "Value" is "anything which is defined and not a reference". But since
>everything which is a "Value" is also a "Str" (String) type, it's also unclear 
>why
>"Value" was included, except for possibly defining future types which may 
>apply.

I really would love to have a better understanding of this so that I can omit 
this note :)
 
Cheers,
Ovid
--
Live and work overseas - http://overseas-exile.blogspot.com/
Buy the book           - http://www.oreilly.com/catalog/perlhks/
Tech blog              - http://blogs.perl.org/users/ovid/
Twitter                - http://twitter.com/OvidPerl/

Reply via email to