in reply to I dont agree with the suggested use of Tie::Hash::Layered

See my module Tie::Hash::Stack for something that is similar. (Mine runs on an array of hashes, this appears to run on a hash of arrays).

(big honkin' IMHO warning!) Note that I think my module handles the idea of layers a bit better in the suggestions that you mention. That is, with my module, if you switch to a new 'set' of preferences, using your example, you simply push a new hash; all hash sets are done in that hash, so that if you then want to drop back a layer, you simply pop that last hash off and ALL settings from that layer are gone. Here, to do the same, you have to push every key/value pair and then pop each one of those, a lot more work.

In my case, I think the idea is more useful when you have several 'panes' of linear data entry, which allow the user to go backwards as well to undo changes, as typical with InstallShield and friends. Each time the user clicks "next", push a new hash onto the stack, and if they hit "back", pop it off.

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

  • Comment on Re: I dont agree with the suggested use of Tie::Hash::Layered