Reorganized all the recipes so they're broken into subsections, and
Dave Rolsky [Tue, 29 Jul 2008 17:45:41 +0000 (17:45 +0000)]
numbered internally in each subsection, as opposed to globally.

27 files changed:
Changes
MANIFEST
lib/Moose/Cookbook.pod
lib/Moose/Cookbook/Basics/Recipe1.pod [moved from lib/Moose/Cookbook/Recipe1.pod with 98% similarity]
lib/Moose/Cookbook/Basics/Recipe10.pod [moved from lib/Moose/Cookbook/Recipe12.pod with 97% similarity]
lib/Moose/Cookbook/Basics/Recipe2.pod [moved from lib/Moose/Cookbook/Recipe2.pod with 99% similarity]
lib/Moose/Cookbook/Basics/Recipe3.pod [moved from lib/Moose/Cookbook/Recipe3.pod with 98% similarity]
lib/Moose/Cookbook/Basics/Recipe4.pod [moved from lib/Moose/Cookbook/Recipe4.pod with 99% similarity]
lib/Moose/Cookbook/Basics/Recipe5.pod [moved from lib/Moose/Cookbook/Recipe5.pod with 98% similarity]
lib/Moose/Cookbook/Basics/Recipe6.pod [moved from lib/Moose/Cookbook/Recipe6.pod with 96% similarity]
lib/Moose/Cookbook/Basics/Recipe7.pod [moved from lib/Moose/Cookbook/Recipe7.pod with 96% similarity]
lib/Moose/Cookbook/Basics/Recipe9.pod [moved from lib/Moose/Cookbook/Recipe9.pod with 97% similarity]
lib/Moose/Cookbook/Meta/Recipe2.pod [moved from lib/Moose/Cookbook/Recipe21.pod with 99% similarity]
lib/Moose/Cookbook/Meta/Recipe3.pod [moved from lib/Moose/Cookbook/Recipe22.pod with 97% similarity]
lib/Moose/Cookbook/Roles/Recipe1.pod [moved from lib/Moose/Cookbook/Recipe10.pod with 99% similarity]
lib/Moose/Cookbook/Roles/Recipe2.pod [moved from lib/Moose/Cookbook/Recipe11.pod with 96% similarity]
t/000_recipes/basics/001_point.t [moved from t/000_recipes/001_point.t with 100% similarity]
t/000_recipes/basics/002_bank_account.t [moved from t/000_recipes/002_bank_account.t with 100% similarity]
t/000_recipes/basics/003_binary_tree.t [moved from t/000_recipes/003_binary_tree.t with 100% similarity]
t/000_recipes/basics/004_company.t [moved from t/000_recipes/004_company.t with 100% similarity]
t/000_recipes/basics/005_coercion.t [moved from t/000_recipes/005_coercion.t with 100% similarity]
t/000_recipes/basics/006_augment_inner.t [moved from t/000_recipes/006_augment_inner.t with 100% similarity]
t/000_recipes/basics/010_genes.t [moved from t/000_recipes/012_genes.t with 100% similarity]
t/000_recipes/meta/002_meta_attribute.t [moved from t/000_recipes/021_meta_attribute.t with 100% similarity]
t/000_recipes/meta/003_attribute_trait.t [moved from t/000_recipes/022_attribute_trait.t with 100% similarity]
t/000_recipes/roles/001_roles.t [moved from t/000_recipes/010_roles.t with 100% similarity]
t/000_recipes/roles/002_advanced_role_composition.t [moved from t/000_recipes/011_advanced_role_composition.t with 100% similarity]

diff --git a/Changes b/Changes
index 2996f0a..0a785c0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -11,8 +11,12 @@ Revision history for Perl extension Moose
         the type constraints (RT #37569)
         - added tests for this (Charles Alderman)
 
-    * Moose::Cookbook::Recipe12
-      - A new recipe that shows off operator overloading
+    * Moose::Cookbook
+      - reorganized the recipes into sections - Basics, Roles, Meta
+        (Dave Rolsky)
+
+    * Moose::Cookbook::Basics::Recipe10
+      - A new recipe that demonstrates operator overloading
         in combination with Moose. (bluefeet)
 
 0.54 Thurs. July 3, 2008
index cf41243..d83b67f 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -13,19 +13,20 @@ inc/Module/Install/Win32.pm
 inc/Module/Install/WriteAll.pm
 lib/Moose.pm
 lib/Moose/Cookbook.pod
+lib/Moose/Cookbook/Basics/Recipe1.pod
+lib/Moose/Cookbook/Basics/Recipe10.pod
+lib/Moose/Cookbook/Basics/Recipe2.pod
+lib/Moose/Cookbook/Basics/Recipe3.pod
+lib/Moose/Cookbook/Basics/Recipe4.pod
+lib/Moose/Cookbook/Basics/Recipe5.pod
+lib/Moose/Cookbook/Basics/Recipe6.pod
+lib/Moose/Cookbook/Basics/Recipe7.pod
+lib/Moose/Cookbook/Basics/Recipe9.pod
 lib/Moose/Cookbook/FAQ.pod
-lib/Moose/Cookbook/Recipe1.pod
-lib/Moose/Cookbook/Recipe10.pod
-lib/Moose/Cookbook/Recipe11.pod
-lib/Moose/Cookbook/Recipe2.pod
-lib/Moose/Cookbook/Recipe21.pod
-lib/Moose/Cookbook/Recipe22.pod
-lib/Moose/Cookbook/Recipe3.pod
-lib/Moose/Cookbook/Recipe4.pod
-lib/Moose/Cookbook/Recipe5.pod
-lib/Moose/Cookbook/Recipe6.pod
-lib/Moose/Cookbook/Recipe7.pod
-lib/Moose/Cookbook/Recipe9.pod
+lib/Moose/Cookbook/Meta/Recipe2.pod
+lib/Moose/Cookbook/Meta/Recipe3.pod
+lib/Moose/Cookbook/Roles/Recipe1.pod
+lib/Moose/Cookbook/Roles/Recipe2.pod
 lib/Moose/Cookbook/Snack/Keywords.pod
 lib/Moose/Cookbook/Snack/Types.pod
 lib/Moose/Cookbook/Style.pod
@@ -72,16 +73,17 @@ MANIFEST.SKIP
 META.yml
 README
 t/000_load.t
-t/000_recipes/001_point.t
-t/000_recipes/002_bank_account.t
-t/000_recipes/003_binary_tree.t
-t/000_recipes/004_company.t
-t/000_recipes/005_coercion.t
-t/000_recipes/006_augment_inner.t
-t/000_recipes/010_roles.t
-t/000_recipes/011_advanced_role_composition.t
-t/000_recipes/021_meta_attribute.t
-t/000_recipes/022_attribute_trait.t
+t/000_recipes/basics/001_point.t
+t/000_recipes/basics/002_bank_account.t
+t/000_recipes/basics/003_binary_tree.t
+t/000_recipes/basics/004_company.t
+t/000_recipes/basics/005_coercion.t
+t/000_recipes/basics/006_augment_inner.t
+t/000_recipes/basics/010_genes.t
+t/000_recipes/meta/002_meta_attribute.t
+t/000_recipes/meta/003_attribute_trait.t
+t/000_recipes/roles/001_roles.t
+t/000_recipes/roles/002_advanced_role_composition.t
 t/010_basics/001_basic_class_setup.t
 t/010_basics/002_require_superclasses.t
 t/010_basics/003_super_and_override.t
@@ -137,6 +139,7 @@ t/030_roles/015_runtime_roles_and_attrs.t
 t/030_roles/016_runtime_roles_and_nonmoose.t
 t/030_roles/017_extending_role_attrs.t
 t/030_roles/018_runtime_roles_w_params.t
+t/030_roles/019_build.t
 t/030_roles/020_role_composite.t
 t/030_roles/021_role_composite_exclusion.t
 t/030_roles/022_role_composition_req_methods.t
@@ -193,6 +196,8 @@ t/100_bugs/012_DEMOLISH_eats_mini.t
 t/100_bugs/013_lazybuild_required_undef.t
 t/100_bugs/014_DEMOLISHALL.t
 t/100_bugs/016_inheriting_from_roles.t
+t/100_bugs/017_type_constraint_messages.t
+t/100_bugs/018_immutable_metaclass_does_role.t
 t/200_examples/001_example.t
 t/200_examples/002_example_Moose_POOP.t
 t/200_examples/003_example.t
@@ -217,6 +222,11 @@ t/500_test_moose/001_test_moose.t
 t/500_test_moose/002_test_moose_does_ok.t
 t/500_test_moose/003_test_moose_has_attribute_ok.t
 t/500_test_moose/004_test_moose_meta_ok.t
+t/600_todo_tests/001_exception_reflects_failed_constraint.t
+t/600_todo_tests/002_various_role_shit.t
+t/600_todo_tests/003_immutable_n_around.t
+t/600_todo_tests/004_inlined_constructor_modified_new.t
+t/600_todo_tests/005_moose_and_threads.t
 t/lib/Bar.pm
 t/lib/Foo.pm
 t/lib/MyMooseA.pm
index 2c8c167..597fde8 100644 (file)
@@ -21,52 +21,52 @@ for common questions and problems people have with Moose.
 
 =over 4
 
-=item L<Moose::Cookbook::Recipe1> - The (always classic) B<Point> example
+=item L<Moose::Cookbook::Basics::Recipe1> - The (always classic) B<Point> example
 
 A simple Moose-based class. Demonstrated Moose attributes and subclassing.
 
-=item L<Moose::Cookbook::Recipe2> - A simple B<BankAccount> example
+=item L<Moose::Cookbook::Basics::Recipe2> - A simple B<BankAccount> example
 
 A slightly more complex Moose class. Demonstrates using a method
 modifier in a subclass.
 
-=item L<Moose::Cookbook::Recipe3> - A lazy B<BinaryTree> example
+=item L<Moose::Cookbook::Basics::Recipe3> - A lazy B<BinaryTree> example
 
 Demonstrates several attribute features, including types, weak
 references, predicates ("does this object have a foo?"), defaults, and
 lazy attribute construction.
 
-=item L<Moose::Cookbook::Recipe4> - Subtypes, and modeling a simple B<Company> class hierarchy
+=item L<Moose::Cookbook::Basics::Recipe4> - Subtypes, and modeling a simple B<Company> class hierarchy
 
 Introduces the creation and use of custom types, a C<BUILD> method,
 and the use of C<override> in a subclass.
 
-=item L<Moose::Cookbook::Recipe5> - More subtypes, coercion in a B<Request> class
+=item L<Moose::Cookbook::Basics::Recipe5> - More subtypes, coercion in a B<Request> class
 
 More type examples, including the use of type coercions.
 
-=item L<Moose::Cookbook::Recipe6> - The augment/inner example
+=item L<Moose::Cookbook::Basics::Recipe6> - The augment/inner example
 
 Demonstrates the use of C<augment> method modifiers, a way of turning
 the usual method overriding style "inside-out".
 
-=item L<Moose::Cookbook::Recipe7> - Making Moose fast with immutable
+=item L<Moose::Cookbook::Basics::Recipe7> - Making Moose fast with immutable
 
 Making a class immutable greatly increases the speed of accessors and
 object construction.
 
-=item L<Moose::Cookbook::Recipe8> - Managing complex relations with trigger (TODO)
+=item L<Moose::Cookbook::Basics::Recipe8> - Managing complex relations with trigger (TODO)
 
 I<abstract goes here>
 
 Work off of this http://code2.0beta.co.uk/moose/svn/Moose/trunk/t/200_examples/007_Child_Parent_attr_inherit.t
 
-=item L<Moose::Cookbook::Recipe9> - Builder methods and lazy_build
+=item L<Moose::Cookbook::Basics::Recipe9> - Builder methods and lazy_build
 
 The builder feature provides an inheritable and role-composable way to
 provide a default attribute value.
 
-=item L<Moose::Cookbook::Recipe12> - Create Humans and their Spawn
+=item L<Moose::Cookbook::Basics::Recipe10> - Create Humans and their Spawn
 
 Shows how operator overloading, coercion, and sub types can be used
 to mimmick the human reproductive system (well, the selection of genes
@@ -78,20 +78,20 @@ at least).  Assumes a basic understanding of Moose.
 
 =over 4
 
-=item L<Moose::Cookbook::Recipe10> - The Moose::Role example
+=item L<Moose::Cookbook::Role::Recipe1> - The Moose::Role example
 
 Demonstrates roles, which are also sometimes known as traits or
 mix-ins. Roles provide a method of code re-use which is orthogonal to
 subclassing.
 
-=item L<Moose::Cookbook::Recipe11> - Advanced Role Composition - method exclusion and aliasing
+=item L<Moose::Cookbook::Role::Recipe2> - Advanced Role Composition - method exclusion and aliasing
 
 Sometimes you just want to include part of a role in your
 class. Sometimes you want the whole role but one if its methods
 conflicts with one in your class. With method exclusion and aliasing,
 you can work around these problems.
 
-=item L<Moose::Cookbook::Recipe12> - Runtime Role Composition (TODO)
+=item L<Moose::Cookbook::Role::Recipe3> - Runtime Role Composition (TODO)
 
 I<abstract goes here>
 
@@ -101,25 +101,25 @@ I<abstract goes here>
 
 =over 4
 
-=item L<Moose::Cookbook::Recipe20> - Welcome to the meta-world (TODO)
+=item L<Moose::Cookbook::Meta::Recipe1> - Welcome to the meta-world (TODO)
 
 I<abstract goes here>
 
-=item L<Moose::Cookbook::Recipe21> - The meta-attribute example
+=item L<Moose::Cookbook::Meta::Recipe2> - The meta-attribute example
 
 One way to extend Moose is to provide your own attribute
 metaclasses. Attribute metaclasses let you extend attribute
 declarations (with C<has>) and behavior to provide additional
 attribute functionality.
 
-=item L<Moose::Cookbook::Recipe22> - The meta-attribute trait example
+=item L<Moose::Cookbook::Meta::Recipe3> - The meta-attribute trait example
 
 Extending Moose's attribute metaclass is a great way to add
 functionality. However, attributes can only have one metaclass.
 Applying roles to the attribute metaclass lets you provide
 composable attribute functionality.
 
-=item L<Moose::Cookbook::Recipe23> - The meta-instance example (TODO)
+=item L<Moose::Cookbook::Meta::Recipe4> - The meta-instance example (TODO)
 
 I<abstract goes here>
 
similarity index 98%
rename from lib/Moose/Cookbook/Recipe1.pod
rename to lib/Moose/Cookbook/Basics/Recipe1.pod
index 04c2c80..bfcec7e 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe1 - The (always classic) B<Point> example.
+Moose::Cookbook::Basics::Recipe1 - The (always classic) B<Point> example.
 
 =head1 SYNOPSIS
 
similarity index 97%
rename from lib/Moose/Cookbook/Recipe12.pod
rename to lib/Moose/Cookbook/Basics/Recipe10.pod
index 7913e77..ae15b0e 100644 (file)
@@ -3,8 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe12 - Create humans and their spawn using operator
-overloading, subtypes, and coercion.
+Moose::Cookbook::Basics::Recipe10 - Operator overloading, subtypes, and coercion.
 
 =head1 SYNOPSIS
 
@@ -86,7 +85,7 @@ L<Moose::Util::TypeConstraints>.  Int, Str, and CodeRef are
 all examples.  Subtypes give you the ability to inherit the
 constraints of an existing type, and adding additional
 constraints on that type.  An introduction to type constraints
-is available in the L<Moose::Cookbook::Recipe4>.
+is available in the L<Moose::Cookbook::Basics::Recipe4>.
 
 =head2 Coercion
 
@@ -95,7 +94,7 @@ is checked to validate the value.  Normally, if the value
 does not pass the constraint, an exception will be thrown.
 But, it is possible with Moose to define the rules to coerce
 values from one type to another.  A good introduction to
-this can be found in L<Moose::Cookbook::Recipe5>.
+this can be found in L<Moose::Cookbook::Basics::Recipe5>.
 
 =head1 GENES
 
similarity index 99%
rename from lib/Moose/Cookbook/Recipe2.pod
rename to lib/Moose/Cookbook/Basics/Recipe2.pod
index 9bb2c93..2fa9f9e 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe2 - A simple B<BankAccount> example
+Moose::Cookbook::Basics::Recipe2 - A simple B<BankAccount> example
 
 =head1 SYNOPSIS
 
similarity index 98%
rename from lib/Moose/Cookbook/Recipe3.pod
rename to lib/Moose/Cookbook/Basics/Recipe3.pod
index 16836bb..9782548 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe3 - A lazy B<BinaryTree> example
+Moose::Cookbook::Basics::Recipe3 - A lazy B<BinaryTree> example
 
 =head1 SYNOPSIS
 
@@ -220,7 +220,7 @@ You I<can> use the C<default> option without the C<lazy> option if
 you like, as we showed in the second recipe.
 
 And actually, you can use C<builder> instead of C<default>. See
-L<Moose::Cookbook::Recipe9> for details.
+L<Moose::Cookbook::Basics::Recipe9> for details.
 
 =back
 
similarity index 99%
rename from lib/Moose/Cookbook/Recipe4.pod
rename to lib/Moose/Cookbook/Basics/Recipe4.pod
index ad088fd..3b8b0e6 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe4 - Subtypes, and modeling a simple B<Company> class hierarchy
+Moose::Cookbook::Basics::Recipe4 - Subtypes, and modeling a simple B<Company> class hierarchy
 
 =head1 SYNOPSIS
   
similarity index 98%
rename from lib/Moose/Cookbook/Recipe5.pod
rename to lib/Moose/Cookbook/Basics/Recipe5.pod
index f0bac8a..a54af7a 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe5 - More subtypes, coercion in a B<Request> class
+Moose::Cookbook::Basics::Recipe5 - More subtypes, coercion in a B<Request> class
 
 =head1 SYNOPSIS
 
similarity index 96%
rename from lib/Moose/Cookbook/Recipe6.pod
rename to lib/Moose/Cookbook/Basics/Recipe6.pod
index 6381776..bce383d 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe6 - The augment/inner example
+Moose::Cookbook::Basics::Recipe6 - The augment/inner example
 
 =head1 SYNOPSIS
     
similarity index 96%
rename from lib/Moose/Cookbook/Recipe7.pod
rename to lib/Moose/Cookbook/Basics/Recipe7.pod
index 44b5c62..fdb0f1c 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe7 - Making Moose fast with immutable
+Moose::Cookbook::Basics::Recipe7 - Making Moose fast with immutable
 
 =head1 SYNOPSIS
 
similarity index 97%
rename from lib/Moose/Cookbook/Recipe9.pod
rename to lib/Moose/Cookbook/Basics/Recipe9.pod
index 9ccf92a..a73748e 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe9 - Builder methods and lazy_build
+Moose::Cookbook::Basics::Recipe9 - Builder methods and lazy_build
 
 =head1 SYNOPSIS
 
@@ -48,7 +48,7 @@ Moose::Cookbook::Recipe9 - Builder methods and lazy_build
 
 =head1 DESCRIPTION
 
-If you've already read L<Moose::Cookbook::Recipe3>, then this example
+If you've already read L<Moose::Cookbook::Basics::Recipe3>, then this example
 should look awfully familiar. In fact, all we've done here is replace
 the attribute C<default> with a C<builder> method.
 
similarity index 99%
rename from lib/Moose/Cookbook/Recipe21.pod
rename to lib/Moose/Cookbook/Meta/Recipe2.pod
index 7196f0f..75b1f93 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe21 - The meta-attribute example
+Moose::Cookbook::Meta::Recipe2 - The meta-attribute example
 
 =head1 SYNOPSIS
 
similarity index 97%
rename from lib/Moose/Cookbook/Recipe22.pod
rename to lib/Moose/Cookbook/Meta/Recipe3.pod
index a0868a6..ccccdd2 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe22 - The attribute trait example
+Moose::Cookbook::Meta::Recipe3 - The attribute trait example
 
 =head1 SYNOPSIS
 
@@ -64,7 +64,7 @@ Moose::Cookbook::Recipe22 - The attribute trait example
 
 =head1 BUT FIRST
 
-This recipe is a continuation of L<Moose::Cookbook::Recipe21>. Please read that
+This recipe is a continuation of L<Moose::Cookbook::Meta::Recipe21>. Please read that
 first.
 
 =head1 MOTIVATION
similarity index 99%
rename from lib/Moose/Cookbook/Recipe10.pod
rename to lib/Moose/Cookbook/Roles/Recipe1.pod
index ebdb439..eca8887 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe10 - The Moose::Role example
+Moose::Cookbook::Roles::Recipe1 - The Moose::Role example
 
 =head1 SYNOPSIS
 
similarity index 96%
rename from lib/Moose/Cookbook/Recipe11.pod
rename to lib/Moose/Cookbook/Roles/Recipe2.pod
index 5f3734a..63836b1 100644 (file)
@@ -3,7 +3,7 @@
 
 =head1 NAME
 
-Moose::Cookbook::Recipe11 - Advanced Role Composition - method exclusion and aliasing
+Moose::Cookbook::Roles::Recipe2 - Advanced Role Composition - method exclusion and aliasing
 
 =head1 SYNOPSIS