Skip to content

Commit 466f634

Browse files
authored
Merge pull request #1281 from metacpan/haarg/fix-diff-struct
fix diff_struct to cope with booleans
2 parents ddcf633 + 1261369 commit 466f634

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/MetaCPAN/Util.pm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ sub diff_struct {
214214
push @queue, map [ $old->{$_}, $new->{$_}, "$path/$_" ],
215215
keys %$new;
216216
}
217+
elsif ( is_bool($new) ) {
218+
return [ $path, $old, $new ]
219+
if !is_bool($old) || $old != $new;
220+
}
217221
else {
218222
die "can't compare $new type data at $path";
219223
}

0 commit comments

Comments
 (0)