diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-24 22:14:50 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-24 22:14:50 +0000 |
commit | 32afff5dca9e4e124f35b72c05a44a7ca4c1399d (patch) | |
tree | ebb48b782b0b6440440fc759168859cc8b2675c5 /lib/Reaction/InterfaceModel/Reflector/DBIC.pm | |
parent | 5ee24b95cec49b29e5508a91d7ae5815cb535ab0 (diff) | |
download | reaction-32afff5dca9e4e124f35b72c05a44a7ca4c1399d.tar.gz reaction-32afff5dca9e4e124f35b72c05a44a7ca4c1399d.zip |
Moose::Role fixed for new moose
Diffstat (limited to 'lib/Reaction/InterfaceModel/Reflector/DBIC.pm')
-rw-r--r-- | lib/Reaction/InterfaceModel/Reflector/DBIC.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm index e428a2d..1c1feeb 100644 --- a/lib/Reaction/InterfaceModel/Reflector/DBIC.pm +++ b/lib/Reaction/InterfaceModel/Reflector/DBIC.pm @@ -735,7 +735,7 @@ class DBIC, which { # attributes => qr//, #DWIM, treated as [qr//] # attributes => [{...}] #DWIM, treat as [qr/./, {...} ] # attributes => [[-exclude => ...]] #DWIM, treat as [qr/./, [-exclude => ...]] - my $attr_haystack = [ map {$_->name} $object->meta->parameter_attributes ]; + my $attr_haystack = [ map { $_->name } $object->meta->parameter_attributes ]; if(!defined $attr_rules){ $attr_rules = [qr/./]; } elsif( (!ref $attr_rules && $attr_rules) || (ref $attr_rules eq 'Regexp') ){ @@ -766,6 +766,8 @@ class DBIC, which { my $o_attr = $o_meta->find_attribute_by_name($attr_name); my $s_attr_name = $o_attr->orig_attr_name || $attr_name; my $s_attr = $s_meta->find_attribute_by_name($s_attr_name); + confess("Unable to find attribute for '${s_attr_name}' via '${source}'") + unless defined $s_attr; next unless $s_attr->get_write_method; #only rw attributes! my $attr_params = $self->parameters_for_source_object_action_attribute |