sub apply_to_value {
my ($self, $value, $inner_value) = @_;
- my $new_value = $value->but_set_action_builder($self)
- ->but_set_identity_path($inner_value->identity_path);
+ my $new_value = $value->but_set_action_builder($self);
return $new_value unless $new_value->isa('DX::Value::Dict');
my %m = %{$new_value->members};
return $new_value->but(
sub apply_to_value {
my ($self, $value) = @_;
- my $new_value = $value->but_set_action_builder($self)
- ->but_set_identity_path($self->target_path);
+ my $new_value = $value->but_set_action_builder($self);
return $new_value unless $new_value->isa('DX::Value::Dict');
my %m = %{$new_value->members};
return $new_value->but(
sub apply_to_value {
my ($self, $value) = @_;
- my $new_value = $value->but_set_action_builder($self)
- ->but_set_identity_path($self->target_path);
+ my $new_value = $value->but_set_action_builder($self);
return $new_value unless $new_value->isa('DX::Value::Dict');
my %m = %{$new_value->members};
return $new_value->but(
locals => [
dict(
map +($_ => DX::Value::Unset->new(
- identity_path => [ 0, $_ ],
action_builder => DX::ActionBuilder::UnsetValue->new(
target_path => [ 0, $_ ],
)
use DX::ActionBuilder::Null;
use DX::Role;
-has identity_path => (is => 'ro');
-
has action_builder => (
is => 'ro',
default => 'DX::ActionBuilder::Null',
$self->but(action_builder => $ab);
}
-sub but_set_identity_path {
- my ($self, $path) = @_;
- $self->but(identity_path => $path);
-}
-
requires 'to_data';
sub equals {
+{ map +($_ => $m->{$_}->to_data), $self->index_list };
}
-sub but_set_identity_path {
- my ($self, $path) = @_;
- my $m = $self->members;
- $self->but(
- identity_path => $path,
- members => +{
- map +($_ => $m->{$_}->but_set_identity_path([ @$path, $_ ])),
- keys %$m
- },
- );
-}
-
1;