develooper Front page | perl.perl5.porters | Postings from February 2012

Re: [PATCH] Add IO::Socket::IP 0.08 as dual-life module

Thread Previous | Thread Next
From:
Paul LeoNerd Evans
Date:
February 3, 2012 06:31
Subject:
Re: [PATCH] Add IO::Socket::IP 0.08 as dual-life module
Message ID:
20120203143139.GV8369@cel.leo
On Fri, Feb 03, 2012 at 09:22:19AM -0500, Ricardo Signes wrote:
> * What Jesse actually said:
> > I'm trying hard to get us to cut down on what ships in core, not
> > expand it. I don't really see the value proposition of adding
> > IO::Socket::IP to the core if IO::Socket::INET works well enough to
> > bootstrap CPAN from an IPv6 mirror. 
> 
> It seems you might have said "it isn't" but it was not clear.

Oh, then yes. ::INET is IPv4-only and would break assumptions by user
code if it wasn't.

> * What else Jesse actually said:
> > I'd love us not to ship two implementations of the same functionality
> > if we can get away with it. You didn't comment on my suggestion that
> > we turn ::INET into a wrapper around ::IP. Is that a plausible path
> > forward?
> 
> Your reply to that seemed to be "I'll think about it."  I don't see any
> subsequent work.

10-second thought:

  package IO::Socket::INET;
  use base qw( IO::Socket::IP );

  sub new
  {
    shift->SUPER::new( Family => AF_INET, @_ );
  }

  1;

Is probably the way to go about implementing that.

I didn't want to do that though because that requires that ::IP -really-
can cope with everything ::INET can, whereas the advantage of them being
separate modules is that each user of ::INET can, on a case-by-case
basis, upgrade their use to ::IP and check that it works for them. This
way feels much safer, at the cost of having two modules in core.

> * Nick asked:
> > To which I'd add, does it work on VMS? VOS? Does NetWare do IPv6?
> 
> Your answer here was, "If the OS does what various standards say, yes."
> 
> Do we have any tests?

See 

  http://perl5.git.perl.org/perl.git/blob/HEAD:/cpan/IO-Socket-IP/t/04local-client-v6.t
  http://perl5.git.perl.org/perl.git/blob/HEAD:/cpan/IO-Socket-IP/t/05local-server-v6.t
  http://perl5.git.perl.org/perl.git/blob/HEAD:/cpan/IO-Socket-IP/t/06local-cross-v6.t

Tests that if the machine supports IPv6 at all, that IO::Socket::IP
copes correctly there.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

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