3 # Create a Person class in lib/Person.pm
5 # A Person has the following attributes:
7 # * first_name - read-write
8 # * last_name - read-write
10 # This class should also have a method named "full_name". This
11 # method should return the first and last name separated by a string
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.
18 # Person->new( [ 'Lisa', 'Smith' ] );
20 # Hint: A quick and dirty way to check for this is to use ref() to check if
21 # the first value in @_ is an array reference (perldoc -f ref). A nicer way to
22 # do this would be use to use Scalar::Util::reftype().
24 # Create an Employee class in lib/Employee.pm
26 # The Employee class is a subclass of Person
28 # An Employee has the following attributes:
30 # * title - read-write
31 # * salary - read-write
34 # The Employee class should override the "full_name" method to
35 # append the employee's title in parentheses ("Jon Smith
36 # (Programmer)"). Use override() and super() for this.
38 # Finally, both classes should be free of Moose droppings, and should be
46 use MooseClass::Tests;
51 MooseClass::Tests::tests01();