Add another init_arg example
[gitmo/moose-presentations.git] / moose-class / exercises / t / 04-method-modifiers.t
1 # Your tasks ...
2 #
3 # You will go back to the Person class and add several method modifiers.
4 #
5 # First, add before and after modifiers to the full_name() method. The
6 # modifiers will be using for debugging. These modifiers will record debugging
7 # info by setting a package global, @Person::CALL;
8 #
9 # The before modifier should push the string "calling full_name" onto
10 # @Person::CALL. The after modifier should push "called full_name" onto this
11 # array.
12 #
13 # You do not need to declare this global, but you can if you like.
14 #
15 # Finally, create an around modifier for full_name. This modifier should call
16 # the real full_name method.
17 #
18 # However, if the person object's last name is "Wall" (as in Larry Wall), your
19 # modifier should wrap the full name in asterisks (*), one before the name and
20 # one after, and then return that new version of the name.
21 use strict;
22 use warnings;
23
24 use lib 't/lib';
25
26 use MooseClass::Tests;
27
28 MooseClass::Tests::tests04();