On Tue, 9 Sep 2003, Gordon Henriksen wrote: > Random thought.... > > There's some discussion on perl-qa right now about how Test::More should > implement "is_deeply", which executes a code block and tests that the > return value is equivalent to a particular nested data structure. (The > question posed on that list is with regard to how to handle tie()'d > objects, which is not what I'm addressing here.) Result of that > discussion's outcome, should the serialization API being discussed here > enable the following behavior? > > ok(freeze($expected) eq freeze($actual)); > > I bring this up because using object addresses as IDs in the > serialization entirely prevents this usage.
Good. Having waded through one of the threads on p5p just a minute ago, I'm not willing to guarantee this. In fact, I'm willing to explicitly not guarantee this. If we want to compare two frozen structures, string equality is *not* the way to go. Each freeze could, theoretically, choose a different freezing method yet still represent the original. This is a Good Place for a black-box comparison op, which string equality definitely is not. Dan