in reply to Using the same hashes as different object variables

If memory is an issue and having two deep copies (clean and dirty) is not great, maybe Tie::Hash::Layered could be useful, depending on whether you want the dirty or clean layer to be 'top'...

Otherwise you could keep the dirty as a hash slice, and have methods to see whether a 'dirty' version of the data exists and if not use the 'clean' as default. An interesting problem... Let us know how you get on!

Just a something something...
  • Comment on Re: Using the same hashes as different object variables