DIRECTORY CONTENTS ================== This tarball contains exercises for the Intro to Moose class. Here's what's what ... t/*.t - each .t file contains instructions on what the exercise is, and runs the tests to check your code. t/lib - includes a recent (enough) copy of the Test-Harness and Test-Simple distributions so we're all on the same page, as well as some other modules used in the tests. t/lib/MooseClass/Tests.pm - the actual tests all live in this module. It also shows many examples of how to use Moose's metaclass APIs for introspection. bin/prove - a slightly hacked version of prove that makes sure to look in t/lib first. If you have a recent version of prove installed, this can be ignored, but it's worth trying if you have any weird problems. lib - this will be your working directory for most exercises. You'll be creating various classes and roles in here, and then testing against the test code. answers - code that passes all the tests for each section. You can look in here if you're stuck, or if you just want to see how someone else did these exercises. install-moose and moosepan/ - a local CPAN mirror with just Moose and its dependencies. See below for usage instructions. INSTALLING MOOSE AND ITS DEPENDENCIES ===================================== This directory contains a partial CPAN mirror that will allow you to install Moose and all of its dependencies. Just run: /path/to/perl install-moose and it will use this mirror to install the latest version of Moose on your system. This assumes that you have already configured the CPAN shell on your system in the past. If you haven't, it may still work, or it may prompt you for a bunch of configuration items first. This script may try to connect to the net (even though it shouldn't). If you are behind a firewall that requires a proxy for http, this may cause the script to simply hang. In that case, try setting the "http_proxy" environment variable to appropriate value before running the script. WINDOWS USERS ============ The above installation script may only work with strawberry perl, and has not been tested with ActiveState. If you are using ActiveState, please install Moose from an appropriate PPM repository. EXERCISES HOW-TO ================ The exercises are all (except for one) designed to be done in the form of writing Perl modules and running tests against them. You will create these modules in the lib/ directory. You will often find yourself changing or extending the module you created in a previous exercise, so don't delete anything from this directory as you go. The instructions on each exercise are in the associated .t file. To run the tests, simply run this command: /path/to/perl bin/prove -lv t/test-name.t The test file name will be something like 01-classes.t. The tests will run in verbose mode, so you will get clues as to what exactly failed. Keep iterating on your code until the tests pass.