The solution is either to avoid creating circular references or to be sure you break them yourself. This is documented in
perlobj. Arguably, it should be documented elsewhere as well; perhaps it should be in
perlref.
Some say this is a failing of Perl's GC strategy. It can also be regarded as a strength. It greatly simplifies things while putting only a small burden on the programmer. If you are using circular references, you are probably sophisticated enough to handle breaking them yourself.
-sauoq
"My two cents aren't worth a dime.";