1 package DX::Role::Update;
5 has target_path => (is => 'ro', required => 1);
7 sub _with_value_at_path {
8 my ($self, $scope, $final_value, @path) = @_;
9 return $final_value->($scope) unless @path;
10 my ($first, @rest) = @path;
11 my $inner = $scope->get_member_at($first);
14 ? $self->_with_value_at_path($inner, $final_value, @rest)
15 : $final_value->($inner)
17 $scope->with_member_at($first, $value);