From: Shawn M Moore Date: Fri, 16 May 2008 17:40:08 +0000 (+0000) Subject: Rename the ProduceStoreArray class to ProduceStore, the Array doesn't really belong... X-Git-Tag: 0_55~171 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=09c00dab7b42985d00f458b3822ef436fd8de85a;p=gitmo%2FMoose.git Rename the ProduceStoreArray class to ProduceStore, the Array doesn't really belong in the name --- diff --git a/lib/Moose/Cookbook/Snack/ArrayRef.pod b/lib/Moose/Cookbook/Snack/ArrayRef.pod index 8219ef8..6dc2bab 100644 --- a/lib/Moose/Cookbook/Snack/ArrayRef.pod +++ b/lib/Moose/Cookbook/Snack/ArrayRef.pod @@ -13,7 +13,7 @@ Moose::Cookbook::Snack::ArrayRef - Using the ArrayRef type constraint has 'name' => (is => 'rw', required => 1); has 'species' => (is => 'rw', required => 1); - package ProduceStoreArray; + package ProduceStore; use Moose; use Moose::Util::TypeConstraints; @@ -25,7 +25,7 @@ Moose::Cookbook::Snack::ArrayRef - Using the ArrayRef type constraint my $orange = Fruit->new(name => 'orange', species => 'C. sinensis'); my $apple = Fruit->new(name => 'apple', species => 'M. domestica'); my @fruit = ($apple, $orange); - my $store = ProduceStoreArray->new(fruit_aisle => \@fruit); + my $store = ProduceStore->new(fruit_aisle => \@fruit); =head1 DESCRIPTION @@ -48,7 +48,7 @@ store's C C attribute, we pass an array containing both objects by reference to the C attribute: my @fruit = ($apple, $orange); - my $store = ProduceStoreArray->new(fruit_aisle => \@fruit); + my $store = ProduceStore->new(fruit_aisle => \@fruit); Or you can pass an anonymous array to the C attribute as well. If you created two new objects, C<$grape> and C<$tomato>, and assigned them to @@ -68,7 +68,7 @@ array values for example, Moose will complain: In order to dump the contents of a C object attribute, you must first de-reference the C, and then enumerate over it's keys. You can add -this method for showing the store's inventory to the C +this method for showing the store's inventory to the C object shown in the SYNOPSIS: sub show_inventory {