I'm writing a test in Perl, and I need to compare two big hashes.
I use cmp_deep
(Test::Deep) and is_deeply
(Test::More).
My problem is when something is different in those hashes, the program quits in the middle.
my $this = { a=>1, b=>2, d=>2, };
my $that = { a=>1, b=>3, c=>3, };
is_deeply($this , $that );
and the output is:
# not ok 1
# Failed test at Tester.pl line 32.
# Structures begin differing at:
# $got->{b} = '2'
# $expected->{b} = '3'
but I have more values that are different! I need to see them all.
How can I force is_deeply
to print all the differences between the hashes rather than just the first difference between them?
Furthermore, there are some keys I need to ignore them. How can I do that?