From: Dave Rolsky Date: Sat, 2 May 2009 21:16:06 +0000 (-0500) Subject: Fix some odd indentation in some code examples X-Git-Tag: 0.78~57 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff51bdc62939b47966f36412fdb8774f91e4880f;p=gitmo%2FMoose.git Fix some odd indentation in some code examples --- diff --git a/lib/Moose/Manual/BestPractices.pod b/lib/Moose/Manual/BestPractices.pod index b6ea608..30c5673 100644 --- a/lib/Moose/Manual/BestPractices.pod +++ b/lib/Moose/Manual/BestPractices.pod @@ -149,7 +149,7 @@ type. # very naughty! coerce 'ArrayRef' => from Str - => via { [ split /,/ ] }; + => via { [ split /,/ ] }; Instead, create a subtype and coerce that: @@ -157,7 +157,7 @@ Instead, create a subtype and coerce that: coerce 'My::ArrayRef' => from 'Str' - => via { [ split /,/ ] }; + => via { [ split /,/ ] }; =head2 Do not coerce class names directly @@ -168,7 +168,7 @@ have magical side effects elsewhere: # also very naughty! coerce 'HTTP::Headers' => from 'HashRef' - => via { HTTP::Headers->new( %{$_} ) }; + => via { HTTP::Headers->new( %{$_} ) }; Instead, we can create an "empty" subtype for the coercion: @@ -176,7 +176,7 @@ Instead, we can create an "empty" subtype for the coercion: coerce 'My::HTTP::Headers' => from 'HashRef' - => via { HTTP::Headers->new( %{$_} ) }; + => via { HTTP::Headers->new( %{$_} ) }; =head2 Use coercion instead of unions