$ perl t/DaemonHeavyLeak.t
ListParser is gone
End of program
daemon is gone
FSA::Rules=HASH(0x2faeea8) [refcount 2] is
+- referenced by REF(0x2fa6ea8) [refcount 1], which is
| not found anywhere I looked :(
+- referenced by REF(0x27a1578) [refcount 1], which is
the lexical '$self' in CODE(0x27978b8) [refcount 4], which is
the global &FSA::Rules::DESTROY.
FSA::Rules=HASH(0x2faeea8) [refcount 1] is
referenced by REF(0x2fa6ea8) [refcount 1], which is
not found anywhere I looked :(
FSA::Rules is dead
FSA::Rules=HASH(0x2e7a198) [refcount 2] is
+- referenced by REF(0x2e7a768) [refcount 1], which is
| not found anywhere I looked :(
+- referenced by REF(0x27a1578) [refcount 1], which is
the lexical '$self' in CODE(0x27978b8) [refcount 4], which is
the global &FSA::Rules::DESTROY.
FSA::Rules=HASH(0x2e7a198) [refcount 1] is
referenced by REF(0x2e7a768) [refcount 1], which is
not found anywhere I looked :(
FSA::Rules is dead
####
use warnings;
use strict;
use Siebel::Srvrmgr::Daemon::Heavy;
use Cwd;
use File::Spec;
use Scalar::Util qw(weaken);
my $repeat = 3;
my $daemon = Siebel::Srvrmgr::Daemon::Heavy->new(
{
gateway => 'whatever',
enterprise => 'whatever',
user => 'whatever',
password => 'whatever',
server => 'whatever',
bin => File::Spec->catfile( getcwd(), 'srvrmgr-mock.pl' ),
use_perl => 1,
is_infinite => 0,
timeout => 0,
commands => [
Siebel::Srvrmgr::Daemon::Command->new(
command => 'list comp',
action => 'Dummy'
)
]
}
);
for ( 1 .. $repeat ) {
$daemon->run();
}
syswrite STDOUT, "End of program\n";
####
sub DESTROY {
my $self = shift;
use Devel::FindRef;
use Scalar::Util qw(weaken);
syswrite STDOUT, Devel::FindRef::track $self;
weaken($self);
delete $machines{+shift};
syswrite STDOUT, Devel::FindRef::track $self;
syswrite STDOUT, "FSA::Rules is dead\n"
}
####
+- referenced by REF(0x2e7a768) [refcount 1], which is
| not found anywhere I looked :(