tie mechanism isn’t something people reach for often, but that’s one of the reasons I included a chapter about it in Mastering Perl. No one else is writing about it either, and in some cases it an be quite useful.
I wrote several modules as examples for this chapter, but I never uploaded them to CPAN. Now I’m putting them on CPAN so they are easy to get if you want to play with them yourself. Not only that, I didn’t like the style that I used back then, so I made some cosmetic changes and light refactorings. They include:
- Tie::Cycle (already on CPAN)
- Tie::StringArray (coming soon)
- Tie::Hash::WordCounter (coming soon)
- Tie::File::Timestamp (coming soon)
You can read this chapter in O’Reilly Atlas.