Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Need a test for deep equality

by andreychek (Parson)
on Apr 20, 2002 at 15:43 UTC ( #160790=note: print w/replies, xml ) Need Help??

in reply to Need a test for deep equality

There is a module for this over at CPAN called Struct::Compare. From the description:

Compares two values of any type and structure and returns true if they are the same. It does a deep comparison of the structures, so a hash of a hash of a whatever will be compared correctly.

So, you just pass in two structures, and it returns true or false, based on whether or not the structures are equal.

Hope that helps!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://160790]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-06-19 14:16 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.