Subject: | is_deeply() diagnostics off for different reference types |
] perl -Ilib -wle 'use Test::More tests => 1; is_deeply([42], {foo => 42})'
1..1
not ok 1
# Failed test (-e at line 1)
# Structures begin differing at:
# $got = 'ARRAY(0x801180)'
# $expected = 'HASH(0x8012e8)'
# Looks like you failed 1 test of 1.
When is_deeply() is given two different reference types it reports the results back as stringified references. This is somewhat wrong. Its because the formatting code was written expecting things to be of the same type. In the case when they are not it falls back to its string handling code.