Next | Pigs in Space | 33 |
Ledgers say:
'Stick::Role::HasCollection' => { item => 'consumer', collection_roles => [ 'Moonpig::Role::Collection::ConsumerExtras', 'Stick::Role::Collection::Mutable', ] },
This says that a ledger has a collection of consumer objects
my $consumers = $ledger->consumer_collection
my @consumers = $consumers->all; my $n_consumers = $consumers->count; my $some_consumer = $consumers->find_by_guid($guid); # etc.
Next | Copyright © 2013 M. J. Dominus |