[Jifty-commit] r5401 - in Net-Jifty: .
Jifty commits
jifty-commit at lists.jifty.org
Wed May 7 20:44:01 EDT 2008
Author: sartak
Date: Wed May 7 20:44:01 2008
New Revision: 5401
Modified:
Net-Jifty/ (props changed)
Net-Jifty/lib/Net/Jifty.pm
Log:
r55331 at onn: sartak | 2008-05-07 20:43:49 -0400
trigger can only be set on writable attributes
Modified: Net-Jifty/lib/Net/Jifty.pm
==============================================================================
--- Net-Jifty/lib/Net/Jifty.pm (original)
+++ Net-Jifty/lib/Net/Jifty.pm Wed May 7 20:44:01 2008
@@ -989,10 +989,13 @@
: undef;
$opts{isa} = $self->_moosify_type($spec->{type});
- $opts{trigger} = sub {
- my ($self, $new_value, $attribute) = @_;
- $self->update($attribute->name => $new_value);
- };
+ # on set, update the value of this record's column on the server
+ if ($spec->{writable}) {
+ $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