From: Dave Rolsky Date: Sat, 11 Feb 2012 17:57:09 +0000 (-0600) Subject: Rename Basics::Recipe5 to Basics::HTTP_SubtypesAndCoercion X-Git-Tag: 2.0500~75 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoose.git;a=commitdiff_plain;h=e5a728d90e9d494fc8e6cb93f504e0d851d00cb4 Rename Basics::Recipe5 to Basics::HTTP_SubtypesAndCoercion --- diff --git a/lib/Moose.pm b/lib/Moose.pm index 32e137d..27d954b 100644 --- a/lib/Moose.pm +++ b/lib/Moose.pm @@ -459,7 +459,7 @@ for information on how to define a new type, and how to retrieve type meta-data) This will attempt to use coercion with the supplied type constraint to change the value passed into any accessors or constructors. You B supply a type constraint, and that type constraint B define a coercion. See -L for an example. +L for an example. =item I $role_name> diff --git a/lib/Moose/Cookbook.pod b/lib/Moose/Cookbook.pod index 9a04743..a24e4e0 100644 --- a/lib/Moose/Cookbook.pod +++ b/lib/Moose/Cookbook.pod @@ -47,9 +47,9 @@ Introduces the creation and use of custom types, a C method, and the use of C in a subclass. This recipe also shows how to model a set of classes that could be used to model companies, people, employees, etc. -=item L - More subtypes, coercion in a B class +=item L -More type examples, including the use of type coercions. +This recipe covers more subtype creation, including the use of type coercions. =item L - The augment/inner example diff --git a/lib/Moose/Cookbook/Basics/Recipe5.pod b/lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod similarity index 98% rename from lib/Moose/Cookbook/Basics/Recipe5.pod rename to lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod index 46acef4..a455c3e 100644 --- a/lib/Moose/Cookbook/Basics/Recipe5.pod +++ b/lib/Moose/Cookbook/Basics/HTTP_SubtypesAndCoercion.pod @@ -1,6 +1,6 @@ -package Moose::Cookbook::Basics::Recipe5; +package Moose::Cookbook::Basics::HTTP_SubtypesAndCoercion; -# ABSTRACT: More subtypes, coercion in a B class +# ABSTRACT: Demonstrates subtypes and coercion use HTTP-related classes (Request, Protocol, etc.) __END__ diff --git a/lib/Moose/Manual/FAQ.pod b/lib/Moose/Manual/FAQ.pod index 0f01083..422b5c8 100644 --- a/lib/Moose/Manual/FAQ.pod +++ b/lib/Moose/Manual/FAQ.pod @@ -77,12 +77,11 @@ C method. The default implementation accepts key/value pairs or a hash reference. You can override it to take positional args, or any other format -To change the handling of individual parameters, there are -I (See the L for a -complete example and explanation of coercions). With coercions it is -possible to morph argument values into the correct expected -types. This approach is the most flexible and robust, but does have a -slightly higher learning curve. +To change the handling of individual parameters, there are I (See +the L for a complete +example and explanation of coercions). With coercions it is possible to morph +argument values into the correct expected types. This approach is the most +flexible and robust, but does have a slightly higher learning curve. =head3 How do I make non-Moose constructors work with Moose? @@ -156,7 +155,7 @@ coerce the value into a C object using the code in found in the C block. For a more comprehensive example of using coercions, see the -L. +L. If you need to deflate your attribute's value, the current best practice is to add an C modifier to your accessor: