in reply to Re: Test scalar refs (not values) in deeply nested structure
in thread Test scalar refs (not values) in deeply nested structure

unfortunately my data is far from being shallow.

My pragmatic approach is to write a recursive diver which will replace the scalar values with the stringification of their refs.

$$ref = "$ref"

I'll feed this to is_deeply() then, seems to work so far.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: Test scalar refs (not values) in deeply nested structure
by Corion (Patriarch) on Jul 23, 2020 at 20:21 UTC

    So you have a nested data structure, but you want only scalar refs to be compared for identity, while you want to compare everything else structurally?

    If that's not it, maybe show examples and counterexamples of what you want your comparison routine to do.