Replacing $aim->start; with $aim->do_one_loop; causes the same problem as deleting that line completely. I get this error: "(in cleanup) No method called "handler" for object. at Untitled line 0"
Adding this line from the node you linked doesn't seem to make a difference, either: $conn->set_handler(config => sub {$ready = 1});