in reply to Memory leakage? How to avoid/detect them and profile memory usage?
Also consider using the module Test::LeakTrace.
Hope that helps,