Fix my grammar
[gitmo/moose-presentations.git] / moose-class / exercises / t / 04-method-modifiers.t
1 # Your tasks ...
2 #
3 # First, we will create a set of three new classes to make use of the
4 # augment method modifier. The class hierarchy will look like this:
5 #
6 #   Document
7 #      |
8 #   Report
9 #      |
10 #   TPSReport
11 #
12 # The Document class should have two read-only attributes: "title" and
13 # "author".
14 #
15 # The Report class should have one read-only attribute: "summary".
16 #
17 # Finally, the TPSReport class should have three read-only attributes:
18 # "t", "p", and "s".
19 #
20 # The goal is to produce a report that looks this:
21 #
22 # $title
23 #
24 # $summary
25 #
26 # t: $t
27 # p: $p
28 # s: $s
29 #
30 # Written by $author
31 #
32 # This report will be a string returned by the Document->output
33 # method.
34 #
35 # Don't worry too much about how many newlines separate each item (as
36 # long as it's at least one). The test does a little massaging to make
37 # this more forgiving.
38 #
39 # Use augment method modifiers in Report and TPSReport to "inject" the
40 # relevant content, while Document will output the $title and $author.
41
42 use strict;
43 use warnings;
44
45 use lib 't/lib';
46
47 use MooseClass::Tests;
48
49 use TPSReport;
50
51 MooseClass::Tests::tests04();