in reply to Memory leak
I have found Test::Memory::Cycle to be quite essential ... once I understood it. (The output is mostly obtained from Devel::Cycle, and so the most-useful documentation is actually there.)
Memory-cycles show up in the darndest places...
And one more thing: if you aren't using Test::... scripts from the start of the development process, and in every single step through it, boy-howdy are you making things a whole lot harder on yourself! (I've been doing things the hard way for a very long time, as I discovered recently.) The trouble is, as you continue to build an application, stacking layer upon layer upon layer, the potential for errors simply grows. And the nature of those errors, which often materialize in the foundational parts of the system, becomes harder and harder to track. “Memory leak” problems surface as a show-stopper issue at very inopportune times... late in the game... when they have actually existed for weeks and months.