in CPAN I get
<snip>
*** Error code 2
when trying to install Net::DNS::Resolver::Base
If you haven't done it already When installing via cpan, specify install Net::DNS not install Net::DNS::Resolver or Net::DNS::Resolver::Base and let it auto-fetch dependencies.
Also make sure your local resolver works in the first place. If you resolver doesn't work, the perl module won't work either:
host www.spamassassin.org dig www.spamassassin.org
edit your resolve.conf to fix resolver problems.