sub comparifier { no warnings 'uninitialized'; # because blessed() and reftype() can return undef. my $sep = pack 'N', rand 2**15; blessed($_[0]) . $sep . reftype($_[0]) . $sep . $_[0] eq blessed($_[1]) . $sep . reftype($_[1]) . $sep . $_[1] }