in reply to Tracking objects.

The problem to add all objects to a stack (your @pack array) is that this will break Object destruction, since you always will have a reference to any object in the @pack list. To avoid that you can use the module Hash::NoRef, where you can add values to this hash without count the references to this values, keeping the behavior of the garbage colection system.
package Dog ; use Hash::NoRef ; use vars qw(%GHOST_TABLE) ; tie(%GHOST_TABLE , 'Hash::NoRef') ; my $GHOST_ID ; sub new { my $class = shift ; my $this = bless( {} , $class ) ; ++$GHOST_ID ; $GHOST_TABLE->{$GHOST_ID} = $this ; return $this } package main ; { my $obj = new Dog() ; print $GHOST_TABLE->{1} ; ## will show the object reference } print $GHOST_TABLE->{1} ; ## will show undef