It would be nice if this was a custom comparator for Test::Deep, then
you would be apply the "almost" to lists of arbitrarily complex items
and also conduct that test at any level of the data structure
(including nesting if you feeling really fruity),

F

2011/2/17 Ovid <publiustemp-perl...@yahoo.com>:
> --- On Thu, 17/2/11, Ovid <publiustemp-perl...@yahoo.com> wrote:
>
>> From: Ovid <publiustemp-perl...@yahoo.com>
>
>> I've stumbled on a bit of an odd case where I have
>> constantly shifting data I need to test. Ordinarily I would
>> use cmp_deeply from Test::Deep, but it's not quite
>> structured enough. I need something similar to a Levenshtein
>> edit distance for complex data structures.
>
> First pass at a solution:
>
>    http://blogs.perl.org/users/ovid/2011/02/is-almost.html
>
> Cheers,
> Ovid
> --
> Live and work overseas - http://overseas-exile.blogspot.com/
> Buy the book           - http://www.oreilly.com/catalog/perlhks/
> Tech blog              - http://blogs.perl.org/users/ovid/
> Twitter                - http://twitter.com/OvidPerl/
>
>

Reply via email to