Net::DNS::Codes provides forward and reverse lookup for most common C library DNS codes as well as all the codes for the DNS HEADER field.