Explain attributes and subclassing
[gitmo/Moose.git] / lib / Moose / Cookbook / Recipe1.pod
index b672444..30320bd 100644 (file)
@@ -3,13 +3,11 @@
 
 =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');
@@ -22,8 +20,6 @@ Moose::Cookbook::Recipe1 - The (always classic) cartesian point example.
   }
   
   package Point3D;
-  use strict;
-  use warnings;
   use Moose;
   
   extends 'Point';
@@ -43,8 +39,8 @@ example found in the classic K&R C book as well, and many other
 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 
@@ -176,8 +172,9 @@ attributes. It does not I<require> that you pass in the all the
 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
 
@@ -225,7 +222,7 @@ Stevan Little E<lt>stevan@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2006 by Infinity Interactive, Inc.
+Copyright 2006, 2007 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>