in reply to Re: TwoWay hash modification
in thread TwoWay hash modification

Yeah, unfortunately, many modules are not very robust, in that they dont allow for much flexibility. But what can we expect for free! (we do get plenty).

I want to have the operations encapsulated, otherwise, i'll need to perform operations on both hashes every time i want to do anything to one of them. So, i think im going to design my own variation, where you can specify in which direction the "key" operation should be dealt with. The interface may look something like:
tie my %hash, 'Tie::Hash::MyTwoWay'; ... $hash->primary()->delete("foo"); $hash->secondary()->delete("foo");
Here the 2 deletes perform VERY different operations, in that they delete from different directions.

By default, an operation will take place on "primary"
For enhancements, i'll probably add optional aliasing of "primary" and "secondary".