Skip to content

Commit

Permalink
MT#60611 helper/del-value: Delete misplaced APPEND handling
Browse files Browse the repository at this point in the history
The handling for the APPEND pseudo-action comes from the set-value code,
but it does not make sense in the del-value code, where we are trying to
remove a value and not add one.

Change-Id: I6937abcde0f9c0e55c334ca24f9ecb879f00f4be
  • Loading branch information
guillemj committed Jul 31, 2024
1 parent 4250a3f commit 125ab4c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions helper/del-value
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ for my $component (@path) {
elsif (looks_like_number($component) && (! defined(${$valref}) || ref(${$valref}) eq 'ARRAY')) {
$valref = \${$valref}->[$component];
}
elsif ($component eq 'APPEND' && ref($$valref) eq 'ARRAY') {
$valref = \${$valref}->[$#{$$valref}+1];
}
elsif (! defined(${$valref}) || ref(${$valref}) eq 'HASH') {
$valref = \${$valref}->{$component};
}
Expand Down

0 comments on commit 125ab4c

Please sign in to comment.