Subject: | Don't delete unset attributes |
Date: | Mon, 23 Jan 2012 19:41:01 -0600 |
To: | bugs-moosex-storage [...] rt.cpan.org |
From: | Caleb Cushing <xenoterracide [...] gmail.com> |
I wrote this and an associated role for $job, any interest in having
it as part of the main dist? I can of course provide an actual patch.
package MooseX::Storage::Engine::Trait::DontDeleteUnset;
use 5.014;
use warnings;
# VERSION
use Moose::Role;
around collapse_attribute => sub {
my ( $orig, $self, $attr, $options ) = @_;
my $value = $self->collapse_attribute_value( $attr, $options );
$self->storage->{$attr->name} = $value;
};
1;
--
Caleb Cushing
http://xenoterracide.com