The has_changed() and old_values() functionality relies on triggers being called whenever a setter or clearer is called on an attribute.
However, this doesn't work for any complex value (eg hashref/arrayref) as the ref itself might change, without the contents being altered.
Also, these triggers aren't being applied to any attributes included from roles.
Keeping track of changing attributes adds quite a lot of overhead and impacted performance, but we currently have to do it because save() only saves if the object has changed.
The
has_changed()
andold_values()
functionality relies on triggers being called whenever a setter or clearer is called on an attribute.However, this doesn't work for any complex value (eg hashref/arrayref) as the ref itself might change, without the contents being altered.
Also, these triggers aren't being applied to any attributes included from roles.
Keeping track of changing attributes adds quite a lot of overhead and impacted performance, but we currently have to do it because
save()
only saves if the object has changed.