Skip Menu |

This queue is for tickets about the Socket-GetAddrInfo CPAN distribution.

Report information
The Basics
Id: 67521
Status: resolved
Priority: 0/
Queue: Socket-GetAddrInfo

People
Owner: Nobody in particular
Requestors: APOCAL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.21



Subject: Exporter problem under perl-5.6.2
I was working on squashing bugs in POE for perl-5.6.2 and saw this error in the testsuite. I haven't investigated further why Exporter is giving you grief, sorry! Also note the prototype mismatch in the output... I checked cpantesters and there are 2 FAILs with the same problem: http://www.cpantesters.org/cpan/report/71d75c36-3aad-11e0-af57-dbf289819acb http://www.cpantesters.org/cpan/report/d72f7004-2ad7-11e0-b54c-ebcdd6c987b5 apoc@ubuntu32:/home/cpan$ perls/perl_5.6.2_default/bin/perl -V Summary of my perl5 (revision 5.0 version 6 subversion 2) configuration: Platform: osname=linux, osvers=2.6.35-22-generic-pae, archname=i686-linux uname='linux ubuntu32 2.6.35-22-generic-pae #35-ubuntu smp sat oct 16 22:16:51 utc 2010 i686 gnulinux ' config_args='-des -Dprefix=/home/cpan/perls/perl_5.6.2_default -Ui_db' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='4.4.5', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.12.1.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Apr 16 2011 11:48:08 @INC: /home/cpan/perls/perl_5.6.2_default/lib/5.6.2/i686-linux /home/cpan/perls/perl_5.6.2_default/lib/5.6.2 /home/cpan/perls/perl_5.6.2_default/lib/site_perl/5.6.2/i686-linux /home/cpan/perls/perl_5.6.2_default/lib/site_perl/5.6.2 /home/cpan/perls/perl_5.6.2_default/lib/site_perl . -- ~Apocalypse
Subject: gai_5.6.2
Download gai_5.6.2
application/octet-stream 5.1k

Message body not shown because it is not plain text.

On Sat Apr 16 18:46:42 2011, APOCAL wrote: Show quoted text
> I was working on squashing bugs in POE for perl-5.6.2 and saw this error > in the testsuite. I haven't investigated further why Exporter is giving > you grief, sorry!
I think these are two separate issues: Show quoted text
> Also note the prototype mismatch in the output... I checked cpantesters > and there are 2 FAILs with the same problem: > > http://www.cpantesters.org/cpan/report/71d75c36-3aad-11e0-af57-dbf289819acb > > http://www.cpantesters.org/cpan/report/d72f7004-2ad7-11e0-b54c-ebcdd6c987b5
t/00use.t .......... ok Prototype mismatch: sub Socket::IPPROTO_TCP vs () at (eval 11) line 1. t/01getaddrinfo.t .. ok t/02getnameinfo.t .. ok Prototype mismatch: sub Socket::IPPROTO_TCP vs () at (eval 10) line 1. t/03Socket6api.t ... ok Prototype mismatch: sub Socket::IPPROTO_TCP vs () at (eval 10) line 1. t/04import-tag.t ... ok Prototype mismatch: sub Socket::IPPROTO_TCP vs () at (eval 15) line 1. Those look relatively harmless. About the worst that happens is that 5.6.2 would parse IPPROTO_TCP + 3 as IPPROTO_TCP(3) rather than (IPPROTO_TCP()) + 3 But that's unlikely code to be written so I think in practice this warning is OK. # Failed test '$service is www for NH' # at t/05emulation.t line 151. # got: '80' # expected: 'www' That one however looks rather more serious. I suspect a subtle change in behaviour of getservbyport() between 5.6 and later. Try the attached patch; see if it fixes this. If so I'll roll that in with a few other minor changes and call it 0.21. -- Paul Evans
Subject: rt67521.patch
=== modified file 'lib/Socket/GetAddrInfo/Emul.pm' --- lib/Socket/GetAddrInfo/Emul.pm 2011-02-24 17:50:39 +0000 +++ lib/Socket/GetAddrInfo/Emul.pm 2011-04-19 18:30:37 +0000 @@ -270,7 +270,7 @@ $service = "$port"; } else { - my $protname = $flag_dgram ? "udp" : ""; + my $protname = $flag_dgram ? "udp" : "tcp"; $service = getservbyport( $port, $protname ); if( !defined $service ) { $service = "$port";
t/05emulation.t .... ok Your patch fixes it on 5.6.2 :) I'll defer to your judgement regarding the prototype thing :) Don't forget to fix the import error before releasing, ha! Either prereq a version of Exporter that includes the functionality, or remove it :) Thanks again for taking the time to look into this and please let me know if you need me to test anything else. -- ~Apocalypse
According to this smoker at least, it appears working now on 5.6.2: http://www.cpantesters.org/cpan/report/3f4c4f92-7040-11e0-a7d0- c55a42987c1d -- Paul Evans