Clarify how to check whether old value is passed to a trigger
[gitmo/moose-presentations.git] / moose-class / exercises / t / 04-method-modifiers.t
CommitLineData
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 21use strict;
22use warnings;
23
24use lib 't/lib';
25
26use MooseClass::Tests;
27
26164c8d 28MooseClass::Tests::tests04();