Skip Menu |

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

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

People
Owner: OLAF [...] cpan.org
Requestors: iwhite [...] victoria.tc.ca
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.51
Fixed in: 0.53



Subject: Error: Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm
Net-DNS-0.50 This is perl, v5.6.1 built for PA-RISC1.1 HP-UX B.10.20 -- running make test after compling, produces this error: bash-2.00$ CC=gcc make test PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.1/PA-RISC1.1 -I/usr/local/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/00-load..................# Failed test (t/00-load.t at line 8) t/00-load..................NOK 1# Tried to use 'Net::DNS'. # Error: Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 725. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 726. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 726. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 844. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 844. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 874. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 749. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 777. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 784. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 784. # Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm line 784. # BEGIN not safe after errors--compilation aborted at blib/lib/Net/DNS/Resolver/Base.pm line 999. # Compilation failed in require at blib/lib/Net/DNS/Resolver/UNIX.pm line 9. # BEGIN failed--compilation aborted at blib/lib/Net/DNS/Resolver/UNIX.pm line 9. # Compilation failed in require at blib/lib/Net/DNS/Resolver.pm line 19. # BEGIN failed--compilation aborted at blib/lib/Net/DNS/Resolver.pm line 22. # Compilation failed in require at blib/lib/Net/DNS.pm line 58. # BEGIN failed--compilation aborted at blib/lib/Net/DNS.pm line 58. # Compilation failed in require at (eval 1) line 2. t/00-load..................ok 47/75# Looks like you planned 75 tests but only ran 68. t/00-load..................dubious Test returned status 8 (wstat 2048, 0x800) DIED. FAILED tests 1, 69-75 Failed 8/75 tests, 89.33% okay
Show quoted text
> Net-DNS-0.50 > This is perl, v5.6.1 built for PA-RISC1.1 > HP-UX B.10.20
Thanks for the clear report. The bug seemed to be caused because in earlier versions of perl AF_INET6 was not defined in Socket.pm. use strict subs; will then stumble. It turns out that the developers of MRTG were aslo bitten by this (see thread starting at: http://lists.ee.ethz.ch/mrtg-developers/msg00198.html ) Using AF_INET6() instead of AF_INET6 solved their problem (Lorenzo, who was involved in that mrtg fix is sharing an office with me and just confirmed this). I have patched this and released 0.51_01 which should be available on CPAN shortly. Alternatively you can pull it from http://www.net-dns.org/download/Net-DNS-0.51_01.tar.gz --Olaf
From: Sidney Markowitz <sidney [...] sidney.com>
In Cygwin using NET::DNS 0.51_01 I get Your vendor has not defined Socket macro AF_INET6, used at /usr/lib/perl5/site_perl/5.8/cygwin/Net/DNS/Resolver/Base.pm line 874 It seems pretty clear, but in case you need my test case that results in that please let me know.
[guest - Fri Jun 17 19:58:11 2005]: Show quoted text
> In Cygwin using NET::DNS 0.51_01 I get > > Your vendor has not defined Socket macro AF_INET6, used at > /usr/lib/perl5/site_perl/5.8/cygwin/Net/DNS/Resolver/Base.pm line 874 > > It seems pretty clear, but in case you need my test case that results > in > that please let me know. >
This is a but generated by IO::Socket::INET6, did you get that installed without problems? Installation of IO::Socket::INET6 fails on my system, exactly with the same bug. (The test for the support of INET6 is based on assumption that the existence of IO::Socket::INET6 and Socket6 modules indicates system support for INET6, I can add an additional test but wonder if you did not encounter problems during the "make test" for cygwin. puzzled --Olaf
[OLAF - Sun Jun 19 13:51:09 2005]: Show quoted text
> [guest - Fri Jun 17 19:58:11 2005]: >
> > In Cygwin using NET::DNS 0.51_01 I get > > > > Your vendor has not defined Socket macro AF_INET6, used at > > /usr/lib/perl5/site_perl/5.8/cygwin/Net/DNS/Resolver/Base.pm line 874 > > > > It seems pretty clear, but in case you need my test case that results > > in > > that please let me know. > >
> > This is a but generated by IO::Socket::INET6, did you get that installed > without problems? > > Installation of IO::Socket::INET6 fails on my system, exactly with the > same bug. > > (The test for the support of INET6 is based on assumption that the > existence of IO::Socket::INET6 and Socket6 modules indicates system > support for INET6, I can add an additional test but wonder if you did > not encounter problems during the "make test" for cygwin. > > puzzled >
Oh eh yeah the test case would be appreciated if you _do_not_ have IO::Socket:;INET6 installed and you hit this message. --Olaf
From: Sidney Markowitz <sidney [...] sidney.com>
Show quoted text
> Oh eh yeah the test case would be appreciated if you _do_not_ have > IO::Socket:;INET6 installed and you hit this message.
The test case won't do much good because what happened was a problem in my DNS configuration that resulted in an error message in Base.pm and that error message refers to AF_INET6. But it is easy to see at line 874 where the error message does not test $has_test6 unless (defined ($sock[ $nssockfamily ])){ $self->errorstring("Send error: cannot reach $nsname (" . ( ($nssockfamily == AF_INET6()) ? "IPv6" : "" ). ( ($nssockfamily == AF_INET) ? "IPv4" : "" ). ") not available" It might be worth grepping for AF_INET6 in the source to verify that every use of it is inside some conditional (block or statement) that ensures that $has_test6 is true.
Date: Sun, 19 Jun 2005 23:22:45 +0200
From: "Olaf M. Kolkman" <olaf [...] dacht.net>
To: bug-Net-DNS [...] rt.cpan.org
Subject: Re: [cpan #13232] Error: Bareword "AF_INET6" not allowed while "strict subs" in use at blib/lib/Net/DNS/Resolver/Base.pm
RT-Send-Cc:
Show quoted text
> >It might be worth grepping for AF_INET6 in the source to verify that >every use of it is inside some conditional (block or statement) that >ensures that $has_test6 is true. > > >
Good point, will do... Will also look at your patch for the the persistent sockets, I have some other obligations during this week so it may take a couple of days. --Olaf
From: fany [...] noris.net
[OLAF - Tue Jun 14 07:47:03 2005]: Show quoted text
> Using AF_INET6() instead of AF_INET6 solved their problem
In line 759 of lib/Net/DNS/Resolver/Base.pm taken from OLAF/Net-DNS-0.52.tar.gz there's still an occurence of this constant without the parenthesis pair, which triggers the error reported by <iwhite@victoria.tc.ca> here: $sock[AF_INET6] = IO::Socket::INET6->new( Regards, fany
[FANY - Tue Jul 5 05:38:36 2005]: Show quoted text
> [OLAF - Tue Jun 14 07:47:03 2005]: >
> > Using AF_INET6() instead of AF_INET6 solved their problem
> > In line 759 of lib/Net/DNS/Resolver/Base.pm taken from > OLAF/Net-DNS-0.52.tar.gz there's still an occurence of this constant > without the parenthesis pair, which triggers the error reported by > <iwhite@victoria.tc.ca> here: > > $sock[AF_INET6] = IO::Socket::INET6->new( >
Thanks Fany, Fixed on the subversion repository "trunk" --Olaf