1 ---------------------------------------------------------------------
3 ---------------------------------------------------------------------
5 purely functional means we don't have to reinstantiate Engine each time,
6 and IMHO there's no need even without big changes.
8 We can do something like this:
13 $self->map_attributes(sub { $self->collapse_attribute(\%storage, @_) });
16 or we can make collapse_attribute return KVPs (I think that's nicer and more reusable):
21 $self->map_attributes('collapse_attribute'),
22 __class__ => $self->object->meta->name,
26 I 100% agree, the instantiation of Engine was actually a leftover from an
27 early version, so I can make this more functional without too much trouble.
29 ---------------------------------------------------------------------
31 I am not going to do this quite yet, I think there might actually still be value to
32 keeping it the way it is. I want to attempt an engine extension first, before i do this.