From: Dave Rolsky Date: Thu, 8 Jul 2010 23:24:24 +0000 (-0500) Subject: Editing of MX::Types related bits X-Git-Tag: 1.09~61 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=99f1bb40465148b43554b047c12c680c9d3a5666;p=gitmo%2FMoose.git Editing of MX::Types related bits --- diff --git a/lib/Moose/Manual/Types.pod b/lib/Moose/Manual/Types.pod index f70a070..41a5d61 100644 --- a/lib/Moose/Manual/Types.pod +++ b/lib/Moose/Manual/Types.pod @@ -198,19 +198,18 @@ package, C, which can be loaded by other classes in your application. Once you're doing this, you should almost certainly look at the -L extension which allows easy declaration of type libraries -and can export your types as perl constants so that you can refer to them -as just +L module. This module makes it easy to create a "type library" +module, which can export your types as perl constants. has 'counter' => (is => 'rw', isa => PositiveInt); -rather than needing to fully qualify them everywhere. It also allows +This lets you use a short name rather than needing to fully qualify the name +everywhere. It also allows you to write easily create parameterized types: has 'counts' => (is => 'ro', isa => HashRef[PositiveInt]); -and similarly for the union and other syntax discussed below, which -will compile time check your use of names and is generally more robust -than the string type parsing for complex cases. +This module will check your names at compile time, and is generally more +robust than the string type parsing for complex cases. =head1 COERCION