Next | Pigs in Space | 27 |
There are some complications
Retrieving an object requires that the code to implement it be compiled
HEAR YE THE LAW: Data is stored, not implementation
Each object is stored with a list of the roles required to implement it
MooseX::ClassCompositor builds the right object class for the object at load time
Retrieving the same ledger twice must return the same object instance both times
Otherwise you have a race condition
The API ends up looking like this:
Moonpig->env->storage->do_with_ledger($guid, sub { my ($ledger) = @_; ...; });
Next | Copyright © 2013 M. J. Dominus |