A slightly more complex Moose class. Demonstrates using a method modifier in a
subclass.
-=item L<Moose::Cookbook::Basics::Recipe3> - A lazy B<BinaryTree> example
+=item L<Moose::Cookbook::Basics::BinaryTree_AttributeFeatures>
Demonstrates several attribute features, including types, weak
references, predicates ("does this object have a foo?"), defaults,
-package Moose::Cookbook::Basics::Recipe3;
+package Moose::Cookbook::Basics::BinaryTree_AttributeFeatures;
-# ABSTRACT: A lazy B<BinaryTree> example
+# ABSTRACT: Demonstrates various attribute features including lazy, predicates, weak refs, and more
__END__
The B<Person> class does not really demonstrate anything new. It has several
C<required> attributes. It also has a C<predicate> method, which we
-first used in L<recipe 3|Moose::Cookbook::Basics::Recipe3>.
+first used in L<Moose::Cookbook::Basics::BinaryTree_AttributeFeatures>.
The only new feature in the C<Employee> class is the C<override>
method modifier:
=head1 DESCRIPTION
-If you've already read L<Moose::Cookbook::Basics::Recipe3>, then this
-example should look very familiar. In fact, all we've done here is
-replace the attribute's C<default> parameter with a C<builder>.
+If you've already read
+L<Moose::Cookbook::Basics::BinaryTree_AttributeFeatures>, then this example
+should look very familiar. In fact, all we've done here is replace the
+attribute's C<default> parameter with a C<builder>.
In this particular case, the C<default> and C<builder> options act in
exactly the same way. When the C<left> or C<right> attribute is read,
=item *
Using a combination of lazy and default in your attributes to defer
-initialization (see the Binary Tree example in the cookbook for a good
-example of lazy/default usage L<Moose::Cookbook::Basics::Recipe3>)
+initialization (see the Binary Tree example in the cookbook for a good example
+of lazy/default usage
+L<Moose::Cookbook::Basics::BinaryTree_AttributeFeatures>)
=item *