my $packet = $res->send($data->{'name'}, $data->{'type'}, 'IN'); ok($packet, "Got an answer for $data->{name} IN $data->{type}"); is($packet->header->qdcount, 1, 'Only one question'); is($packet->header->ancount, 1, 'Got single answer'); my $question = ($packet->question)[0]; my $answer = ($packet->answer)[0];