-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
A diff for a hashref containing scalars which values are identical but their default freezer (Storable) return value is different are reported as different:
For example:
my $diff = diff({ port => "1434" }, { port => "1434" }, noU => 1);
print Dumper($diff);
outputs:
{
D => {
port => {
N => "1434",
O => "1434",
}
}
}
I'm still trying to get a failing test case but haven't succeeded so far.
Adding these lines after https://github.com/mr-mixas/Struct-Diff.pm/blob/master/lib/Struct/Diff.pm#L233
print "CHECKING $k\n";
print "\tx: '" . $x->{$k} . "' " . $opts{freezer}($x->{$k}) . "\n";
print "\ty: '" . $y->{$k} . "' " . $opts{freezer}($y->{$k}) . "\n";
for example outputs this:
CHECKING port
x: '1434'
12345678
1434
y: '1434'
123451434
Line https://github.com/mr-mixas/Struct-Diff.pm/blob/master/lib/Struct/Diff.pm#L252 causes the failure as it doesn't compare scalars ($type undefined).
Metadata
Metadata
Assignees
Labels
No labels