diff options
author | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-09-03 17:49:28 +0000 |
---|---|---|
committer | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-09-03 17:49:28 +0000 |
commit | d31723749bd4ae2052c628b99b90d3b453ddf0e6 (patch) | |
tree | e8373446fd328d571710469c1dcab7ea45aab379 /lib/Reaction/InterfaceModel | |
parent | 4646dc25bc90bd6f842c97cad1c0828b1f1ee113 (diff) | |
download | reaction-d31723749bd4ae2052c628b99b90d3b453ddf0e6.tar.gz reaction-d31723749bd4ae2052c628b99b90d3b453ddf0e6.zip |
parameter_hashref() now uses default values from action attributes
Diffstat (limited to 'lib/Reaction/InterfaceModel')
-rw-r--r-- | lib/Reaction/InterfaceModel/Action.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Reaction/InterfaceModel/Action.pm b/lib/Reaction/InterfaceModel/Action.pm index c4e4cae..f185384 100644 --- a/lib/Reaction/InterfaceModel/Action.pm +++ b/lib/Reaction/InterfaceModel/Action.pm @@ -31,7 +31,8 @@ sub parameter_hashref { foreach my $attr ($self->parameter_attributes) { my $reader = $attr->get_read_method; my $predicate = $attr->get_predicate_method; - next if defined($predicate) && !$self->$predicate; + next if defined($predicate) && !$self->$predicate + && ($attr->is_lazy_fail || !$attr->has_default); $params{$attr->name} = $self->$reader; } return \%params; |