=head1 NAME
-Moose::Cookbook::Recipe1 - The (always classic) cartesian point example.
+Moose::Cookbook::Recipe1 - The (always classic) B<Point> example.
=head1 SYNOPSIS
package Point;
- use strict;
- use warnings;
use Moose;
has 'x' => (isa => 'Int', is => 'ro');
}
package Point3D;
- use strict;
- use warnings;
use Moose;
extends 'Point';
places. And now, onto the code:
As with all Perl 5 classes, a Moose class is defined in a package.
-Of course we always use C<strict> and C<warnings> (don't forget
-that a kitten will die if you don't) and then we C<use Moose>.
+Moose now handles turning C<strict> and C<warnings> on for you, so
+all you need do is say C<use Moose>, and no kittens will die.
By loading Moose, we are enabeling the Moose "environment" to be
loaded within our package. This means that we export some functions
attributes, and it will politely ignore any named arguments it does
not recognize.
-From here, you can use C<$point> and C<$point3d> just as you would
-any other Perl 5 object.
+From here on, you can use C<$point> and C<$point3d> just as you would
+any other Perl 5 object. For a more detailed example of what can be
+done, you can refer to the F<t/001_recipe.t> test file.
=head1 CONCLUSION
=head1 COPYRIGHT AND LICENSE
-Copyright 2006 by Infinity Interactive, Inc.
+Copyright 2006, 2007 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>