Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 11672
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: jsteller [...] adelphia.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.48
Fixed in: (no value)



Subject: Net::DNS doesn't export Net::DNS::Resolver=HASH(0x810c6ec)
I'm just picking up Perl, so this may be operator error. I have looked around at many Perl sites, but don't see any bugs like this one! Thanks. --- John Teller ========================================= The error output: "Net::DNS::Resolver=HASH(0x810c6ec)" is not exported by the Net::DNS module Can't continue after import errors at test.pl line 5 BEGIN failed--compilation aborted at test.pl line 5. ========================================= The script: #!/usr/bin/perl # Need this one for DNS lookups use Net::DNS my $res = Net::DNS::Resolver->new; print $res->query('62.53.105.174'); print $res->query('google.com'); ========================================= OS: FreeBSD zarkov 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 ========================================= perl -v output: This is perl, v5.8.5 built for i386-freebsd-64int ========================================= Installed p5 packages: p5-Digest-HMAC-1.01 p5-Digest-SHA1-2.10 p5-Net-DNS-0.48
$res->query returns a Net::DNS::Packet object. So what you are trying to do is print the object (the HASH). What you should do is something like my $packet=$res->query("foo"); print $packet->string; or $packet->print; Also see perldoc Net::DNS::Resolver. --Olaf
Date: Mon, 28 Feb 2005 08:49:18 -0700
From: Michael Fuhr <mike [...] fuhr.org>
To: Olaf Kolkman via RT <bug-Net-DNS [...] rt.cpan.org>
Subject: Re: [cpan #11672] Net::DNS doesn't export Net::DNS::Resolver=HASH(0x810c6ec)
RT-Send-Cc:
On Mon, Feb 28, 2005 at 04:05:46AM -0500, Olaf Kolkman via RT wrote: Show quoted text
> $res->query returns a Net::DNS::Packet object. > So what you are trying to do is print the object (the HASH).
And aside from that, the example program is missing a semicolon on the "use Net::DNS" line. That's what appears to be causing the "is not exported" error. -- Michael Fuhr http://www.fuhr.org/~mfuhr/