projects
/
gitmo/moose-presentations.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Redid the augment exercises and based it on a non-XML
[gitmo/moose-presentations.git]
/
moose-class
/
exercises
/
answers
/
04-method-modifiers
/
Document.pm
1
package Document;
2
3
use Moose;
4
5
has [ qw( title author ) ] => ( is => 'ro' );
6
7
sub 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
20
Written by $a
21
EOF
22
}
23
24
no Moose;
25
26
__PACKAGE__->meta->make_immutable;
27
28
1;