Commit | Line | Data |
26164c8d |
1 | # Your tasks ... |
2 | # |
c21bbce8 |
3 | # You will go back to the Person class and add several method modifiers. |
26164c8d |
4 | # |
c21bbce8 |
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; |
26164c8d |
8 | # |
c21bbce8 |
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. |
26164c8d |
12 | # |
c21bbce8 |
13 | # You do not need to declare this global, but you can if you like. |
26164c8d |
14 | # |
c21bbce8 |
15 | # Finally, create an around modifier for full_name. This modifier should call |
16 | # the real full_name method. |
26164c8d |
17 | # |
c21bbce8 |
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. |
26164c8d |
21 | use strict; |
22 | use warnings; |
23 | |
24 | use lib 't/lib'; |
25 | |
26 | use MooseClass::Tests; |
27 | |
26164c8d |
28 | MooseClass::Tests::tests04(); |