dependency map up, some code running
[scpubgit/DX.git] / lib / DX / Update / RemoveValue.pm
CommitLineData
9d759b64 1package DX::Update::RemoveValue;
2
efad53c4 3use DX::Utils qw(VALUE_EXISTS);
9d759b64 4use DX::Class;
5
6with 'DX::Role::Update';
7
8sub apply_to {
9 my ($self, $scope) = @_;
efad53c4 10 my @path = my @whole_path = @{$self->target_path};
9d759b64 11 my $target = pop @path;
12 return (
13 $self->_with_value_at_path(
14 $scope, sub { $_[0]->without_member_at($target) }, @path
15 ),
efad53c4 16 [ VALUE_EXISTS ,=> @whole_path ],
9d759b64 17 );
18}
19
201;