Indicate which versions of Class::MOP and Moose you have
[gitmo/moose-presentations.git] / moose-class / exercises / t / 01-classes.t
CommitLineData
5cab7e05 1# Your tasks ...
ddd87d75 2#
3# Create a Person class in lib/Person.pm
4#
5# A Person has the following attributes:
6#
7# * first_name - read-write
8# * last_name - read-write
9#
83c2705f 10# This class should also have a method named "full_name". This
ddd87d75 11# method should return the first and last name separated by a string
12# ("Jon Smith").
13#
f7da468c 14# Write a BUILDARGS method for this class which allows the caller to
15# pass a two argument array reference. These should be assigned to the
16# first and last name respectively.
17#
18# Person->new( [ 'Lisa', 'Smith' ] );
19#
ddd87d75 20# Create an Employee class in lib/Employee.pm
21#
22# The Employee class is a subclass of Person
23#
24# An Employee has the following read-write attributes:
25#
8d1ce1d7 26# * title - read-write
ddd87d75 27# * salary - read-write
28# * ssn - read-only
29#
83c2705f 30# The Employee class should override the "full_name" method to
ddd87d75 31# append the employee's title in parentheses ("Jon Smith
32# (Programmer)"). Use override() and super() for this.
33#
34# Finally, both classes should be free of Moose droppings, and should be
35# immutable.
36
37use strict;
38use warnings;
39
40use lib 't/lib';
ba1c9923 41
ddd87d75 42use MooseClass::Tests;
43
44use Person;
45use Employee;
46
47MooseClass::Tests::tests01();