Skip to content

Commit

Permalink
fix diff_struct to cope with booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Oct 1, 2024
1 parent ddcf633 commit 1261369
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 1261369

Please sign in to comment.