From: Mike Whitaker Date: Thu, 26 Feb 2009 09:16:26 +0000 (+0000) Subject: Fix dotted type names to use :: instead, as per earlier in BestPractices X-Git-Tag: 0.72_01~94 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9be9f688c5dd47b1be2947ca70fb7d94d5f23c3;p=gitmo%2FMoose.git Fix dotted type names to use :: instead, as per earlier in BestPractices --- diff --git a/lib/Moose/Manual/BestPractices.pod b/lib/Moose/Manual/BestPractices.pod index 9c00570..514ee4a 100644 --- a/lib/Moose/Manual/BestPractices.pod +++ b/lib/Moose/Manual/BestPractices.pod @@ -153,9 +153,9 @@ type. 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 @@ have magical side effects elsewhere: 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( %{$_} ) };