[Jifty-commit] r5399 - in Net-Jifty: .
Jifty commits
jifty-commit at lists.jifty.org
Wed May 7 20:32:08 EDT 2008
Author: sartak
Date: Wed May 7 20:32:08 2008
New Revision: 5399
Modified:
Net-Jifty/ (props changed)
Net-Jifty/lib/Net/Jifty.pm
Log:
r55327 at onn: sartak | 2008-05-07 20:32:02 -0400
Add a trigger trait which will call Net::Jifty->update on attribute set
Modified: Net-Jifty/lib/Net/Jifty.pm
==============================================================================
--- Net-Jifty/lib/Net/Jifty.pm (original)
+++ Net-Jifty/lib/Net/Jifty.pm Wed May 7 20:32:08 2008
@@ -989,6 +989,11 @@
: undef;
$opts{isa} = $self->_moosify_type($spec->{type});
+ $opts{trigger} = sub {
+ my ($self, $new_value, $attribute) = @_;
+ $self->update($attribute->name => $new_value);
+ };
+
push @attributes, Moose::Meta::Attribute->new($column, %opts);
}
More information about the Jifty-commit
mailing list