excise remaining identity_path code
Matt S Trout [Sat, 17 Sep 2016 17:43:22 +0000 (17:43 +0000)]
lib/DX/ActionBuilder/BoundValue.pm
lib/DX/ActionBuilder/Normal.pm
lib/DX/ActionBuilder/Null.pm
lib/DX/QueryState.pm
lib/DX/Role/Value.pm
lib/DX/Value/Dict.pm

index 35e4232..a324524 100644 (file)
@@ -44,8 +44,7 @@ sub action_for_add_member {
 
 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(
index 45e5abd..089c956 100644 (file)
@@ -29,8 +29,7 @@ sub action_for_remove_member { die 'WHUT' }
 
 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(
index b7b2738..1ed847e 100644 (file)
@@ -33,8 +33,7 @@ sub specialize_for_member {
 
 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(
index ac4039b..9ef30a5 100644 (file)
@@ -35,7 +35,6 @@ sub new_search_state_for {
     locals => [
       dict(
         map +($_ => DX::Value::Unset->new(
-                      identity_path => [ 0, $_ ],
                       action_builder => DX::ActionBuilder::UnsetValue->new(
                         target_path => [ 0, $_ ],
                       )
index 018b956..4ff2320 100644 (file)
@@ -3,8 +3,6 @@ package DX::Role::Value;
 use DX::ActionBuilder::Null;
 use DX::Role;
 
-has identity_path => (is => 'ro');
-
 has action_builder => (
   is => 'ro',
   default => 'DX::ActionBuilder::Null',
@@ -20,11 +18,6 @@ sub but_set_action_builder {
   $self->but(action_builder => $ab);
 }
 
-sub but_set_identity_path {
-  my ($self, $path) = @_;
-  $self->but(identity_path => $path);
-}
-
 requires 'to_data';
 
 sub equals {
index 44cc0ab..85decc7 100644 (file)
@@ -44,16 +44,4 @@ sub to_data {
   +{ 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;