has 'species' => ( is => 'rw', required => 1 );
- package ProduceStoreHash;
+ package ProduceStore;
use Moose;
use Moose::Util::TypeConstraints;
my $orange = Fruit->new( species => 'C. sinensis' );
my $apple = Fruit->new( species => 'M. domestica' );
my %fruit = ( orange => $orange, apple => $apple );
- my $store = ProduceStoreHash->new( fruit_aisle => \%fruit );
+ my $store = ProduceStore->new( fruit_aisle => \%fruit );
=head1 DESCRIPTION
reference to the C<fruit_aisle> attribute:
my %fruit = ( orange => $orange, apple => $apple );
- my $store = ProduceStoreHash->new( fruit_aisle => \%fruit );
+ my $store = ProduceStore->new( fruit_aisle => \%fruit );
Or you can pass an anonymous hash to the C<HashRef> attribute as well. If you
created two new objects, C<$grape> and C<$tomato>, and assigned them to the