http://www.perlmonks.org?node_id=459640


in reply to Recursively traverse two data structures and test for match

I imagine the routine doesn't provide anything over Test::More, but I thought it would be fun to roll one on my own. Besides, you can just cut and paste this routine into your program - no need to mess with installing modules.

I notice I didn't include tests for CODE refs, however. I'm a naughty boy.

  • Comment on Re: Recursively traverse two data structures and test for match

Replies are listed 'Best First'.
Re^2: Recursively traverse two data structures and test for match
by diotalevi (Canon) on May 23, 2005 at 18:17 UTC
    I didn't see you testing for cycles. Any self referential structure is going to cause your code to stop in an infinite loop.