Devel::Events::Handler::ObjectTracker - A Devel::Events that tracks leaks
use Devel::Events::Handler::ObjectTracker; use Devel::Events::Generator::Objects; my $tracker = Devel::Events::Handler::ObjectTracker->new(); my $gen = Devel::Events::Generator::Objects->new( handler => $tracker, ); $gen->enable(); # start generating events $code->(); $gen->disable(); use Data::Dumper; warn Dumper($tracker->live_objects);
This object will keep track of every object created and every object destroyed based on the
object_destroy events. Reblessing is accounted for.
This handler doesn't perform any magical stuff, Devel::Events::Generator::Objects is responsible for raising the proper events.
A Tie::RefHash::Weak hash that keeps an index of every live object and the
object_blessevent that created it.
Keeps a count of the live instances per class, much like Devel::Leak::Object.
USed to maintain the