load all relevant classes to prevent confusing "Foo does have a meta method" bail...
[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 augment
4 # 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: "t",
18 # "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 should be returned as a string from the Document->output method.
33 #
34 # Don't worry too much about how many newlines separate each item (as long as
35 # it's at least one). The test does a little massaging to make this more
36 # forgiving.
37 #
38 # Use augment method modifiers in Report and TPSReport to "inject" the
39 # relevant content, while Document will output the $title and $author.
40
41 use strict;
42 use warnings;
43
44 use lib 't/lib';
45
46 use MooseClass::Tests;
47
48 use Document;
49 use Report;
50 use TPSReport;
51
52 MooseClass::Tests::tests04();