From: Dave Rolsky Date: Fri, 7 Nov 2008 21:20:45 +0000 (+0000) Subject: Tidy the code (and clean up rampant wacky whitespace for RT 40432) X-Git-Tag: 0.61~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f1c9feb4c023e53dfd08b4b28298a662bce6e5ec;p=gitmo%2FMoose.git Tidy the code (and clean up rampant wacky whitespace for RT 40432) --- diff --git a/lib/Moose/Cookbook/Basics/Recipe6.pod b/lib/Moose/Cookbook/Basics/Recipe6.pod index bce383d..9fb42dd 100644 --- a/lib/Moose/Cookbook/Basics/Recipe6.pod +++ b/lib/Moose/Cookbook/Basics/Recipe6.pod @@ -6,57 +6,58 @@ Moose::Cookbook::Basics::Recipe6 - The augment/inner example =head1 SYNOPSIS - + package Document::Page; use Moose; - - has 'body' => (is => 'rw', isa => 'Str', default => sub {''}); - + + has 'body' => ( is => 'rw', isa => 'Str', default => sub {''} ); + sub create { my $self = shift; $self->open_page; inner(); $self->close_page; } - - sub append_body { - my ($self, $appendage) = @_; - $self->body($self->body . $appendage); + + sub append_body { + my ( $self, $appendage ) = @_; + $self->body( $self->body . $appendage ); } - + sub open_page { (shift)->append_body('') } - sub close_page { (shift)->append_body('') } - + sub close_page { (shift)->append_body('') } + package Document::PageWithHeadersAndFooters; use Moose; - + extends 'Document::Page'; - + augment 'create' => sub { my $self = shift; $self->create_header; inner(); $self->create_footer; }; - + sub create_header { (shift)->append_body('
') } - sub create_footer { (shift)->append_body('