I was going nuts recently, trying to figure out why I couldn't use is_deeply to compare objects. I've finally determined that it's only an issue (as far as I see) when comparing objects that overload dereferencing to their implementation type.
The attached code should fail all three tests; at no point are the two structures identical. Instead, the third test -- when the structures are blessed into an implementation-type overloaded class -- passes. This should be simple-ish to fix, I'd think. 1. two objects are different if their implementation types differ 2. two objects are different if their blessed-into-temp-class structures differ 3. otherwise two objects are the same So, given two Garbage::Overloaded=HASH objects, we'd bless them into Test::More::TempClass and then compare those. Thoughts? -- rjbs
obj_deep.t
Description: Troff document
pgp2XZlddHnb0.pgp
Description: PGP signature