develooper Front page | perl.perl5.porters | Postings from January 2011

Re: [PATCH] Implement Socket::getaddrinfo and ::getnameinfo, and other IPv6 work

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
January 4, 2011 02:26
Subject:
Re: [PATCH] Implement Socket::getaddrinfo and ::getnameinfo, and other IPv6 work
Message ID:
20110104102643.GI24189@plum.flirble.org
On Tue, Jan 04, 2011 at 06:20:29PM +0800, Jesse Vincent wrote:

> On Mon  3.Jan'11 at 19:16:35 +0000, Paul LeoNerd Evans wrote:
> > > > Is there / will there be a version number this can be detected by? Or is
> > > > it best to use   require Socket and defined &Socket::getaddrinfo   ?
> > > 
> > > It'll get bumped for 5.13.next :)
> > 
> > Righty.
> > 
> > What would you suggest is safest, though?
> 
> I was expecting:
> 
> use Socket;
> 
> if ($Socket::VERSION >= 1.23456) {
>  ....
> }
> 
> It'd be nice just to get Socket dual-lifed, so you could 
> 
> "use Socket 1.23456" 

Indeed. This would require shipping a Makefile.PL (or Build.PL) with the Socket
distribution that probed for the C functions that older perl's Configure
scripts don't look for, so it's not quite as trivial as it might seen. But I
assume that this would pretty much be what Socket::GetAddrInfo's Build.PL
already does, so maybe it's not as bad, either.

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About