Skip to content

Commit

Permalink
Merge pull request #1281 from metacpan/haarg/fix-diff-struct
Browse files Browse the repository at this point in the history
fix diff_struct to cope with booleans
  • Loading branch information
haarg authored Oct 1, 2024
2 parents ddcf633 + 1261369 commit 466f634
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/MetaCPAN/Util.pm
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ sub diff_struct {
push @queue, map [ $old->{$_}, $new->{$_}, "$path/$_" ],
keys %$new;
}
elsif ( is_bool($new) ) {
return [ $path, $old, $new ]
if !is_bool($old) || $old != $new;
}
else {
die "can't compare $new type data at $path";
}
Expand Down

0 comments on commit 466f634

Please sign in to comment.