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