Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Diff on hashes

by djantzen (Priest)
on Nov 12, 2002 at 13:55 UTC ( [id://212260]=note: print w/replies, xml ) Need Help??


in reply to Diff on hashes

There are several CPAN modules that I think will do what you need. Perhaps Data::Compare or Class::MakeMethods::Utility::Ref will do the trick. Long ago there was Ref, but I think that has gone away

Update: Hmm, actually you need more than what those can do. Perhaps you could use one of the above to test whether the structure has changed, and if it has you could grep the keys of the two versions to see which keys are different. Of course that means keeping around two copies of the "same" hash -- one for control and the other for actual use -- but it sounds like you mean to do that anyway.

Update 2: Check out Dominus's Tie::HashHistory which provides a kind of journalling hash.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found