An aid in finding any circular references could be Devel::Cycle.
lodin
In reply to Re^2: scope and undef (Devel::Cycle) by lodin in thread scope and undef by Ryszard