Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^9: Recursively traverse two data structures and test for match (testing / overload)

by diotalevi (Canon)
on May 23, 2005 at 17:43 UTC ( #459641=note: print w/replies, xml ) Need Help??


in reply to Re^8: Recursively traverse two data structures and test for match (testing / overload)
in thread Recursively traverse two data structures and test for match

Blessing into a non-overloaded package is the official way to get around such difficulties. 'Does::Not::Exist' is a popular one.

My problem was that with a deeply nested data structure, I'd have to walk the entire thing first, find all the objects blessed into the overloaded class, and rebless them prior to asking Test::More to compare the structures. I have the opinion that its all that structure walking that prompted me to use is_deeply() in the first place but to have it fail to work because I couldn't convince it to ignore overloading was a disappointment.

  • Comment on Re^9: Recursively traverse two data structures and test for match (testing / overload)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://459641]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2021-06-12 15:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (53 votes). Check out past polls.

    Notices?