[Moose-commits] r7793 - Moose/trunk/lib/Moose/Manual
penfold at code2.0beta.co.uk
penfold at code2.0beta.co.uk
Thu Feb 26 09:16:27 GMT 2009
Author: penfold
Date: 2009-02-26 01:16:26 -0800 (Thu, 26 Feb 2009)
New Revision: 7793
Modified:
Moose/trunk/lib/Moose/Manual/BestPractices.pod
Log:
Fix dotted type names to use :: instead, as per earlier in BestPractices
Modified: Moose/trunk/lib/Moose/Manual/BestPractices.pod
===================================================================
--- Moose/trunk/lib/Moose/Manual/BestPractices.pod 2009-02-26 04:48:59 UTC (rev 7792)
+++ Moose/trunk/lib/Moose/Manual/BestPractices.pod 2009-02-26 09:16:26 UTC (rev 7793)
@@ -153,9 +153,9 @@
Instead, create a subtype and coerce that:
- subtype 'My.ArrayRef' => as 'ArrayRef';
+ subtype 'My::ArrayRef' => as 'ArrayRef';
- coerce 'My.ArrayRef'
+ coerce 'My::ArrayRef'
=> from 'Str'
=> via { [ split /,/ ] };
@@ -172,9 +172,9 @@
Instead, we can create an "empty" subtype for the coercion:
- subtype 'My.HTTP::Headers' => as class_type('HTTP::Headers');
+ subtype 'My::HTTP::Headers' => as class_type('HTTP::Headers');
- coerce 'My.HTTP::Headers'
+ coerce 'My::HTTP::Headers'
=> from 'HashRef'
=> via { HTTP::Headers->new( %{$_} ) };
More information about the Moose-commits
mailing list