1 package DX::ActionBuilder::Normal;
3 use DX::Action::SetValue;
4 use DX::Action::AddValue;
7 with 'DX::Role::ActionBuilder';
9 has target_path => (is => 'ro', required => 1);
11 sub action_for_set_value {
12 my ($self, $value) = @_;
13 DX::Action::SetValue->new(
14 target_path => $self->target_path,
15 new_value => $value->but_set_action_builder($self)
19 sub action_for_add_member {
20 my ($self, $at, $value) = @_;
21 my @add_path = (@{$self->target_path}, ref($at) ? $at->string_value : $at);
22 DX::Action::AddValue->new(
23 target_path => \@add_path,
24 new_value => $value->but_set_action_builder(
25 $self->but(target_path => \@add_path)
30 sub action_for_remove_member { die 'WHUT' }