Remove slide on sharing a ref in a default (too obscure to really be worthwhile)
[gitmo/moose-presentations.git] / moose-class / exercises / answers / 04-method-modifiers / Document.pm
CommitLineData
538499df 1package Document;
2
3use Moose;
4
5has [ qw( title author ) ] => ( is => 'ro' );
6
7sub output {
8 my $self = shift;
9
10 my $t = $self->title;
11 my $a = $self->author;
12
13 my $content = inner();
14
15 return <<"EOF";
16$t
17
18$content
19
20Written by $a
21EOF
22}
23
24no Moose;
25
26__PACKAGE__->meta->make_immutable;
27
281;