in reply to destroying object

Perl's garbage collector won't automatically get rid of structures with circular references until global destruction, at which point you don't know what the order will be. See "Two Phased Garbage Collection" in perldoc perlobj.

The scope and desired lifetime of your different objects and variables isn't completely clear to me, but it looks to me like you could just add:

use Scalar::Util 'weaken'; weaken $glob{user};
after you set $glob{user}.