On Mon, Sep 06, 2010 at 12:21:02PM -0400, Daniel Staal wrote:
> >Can anyone suggest me a better module name for this?
> 
> Honestly, the name I'd want on that module is IO::Socket::INET.  Fix
> the whole problem, instead of just being the new best choice.  (For
> everyone who bothers to notice, and upgrade.)

I have considered on that, but the thing is that there's a close
association between the socket domain and the module name here. There
are many IO::Socket::$FAMILY modules on CPAN, and apart from the mixed
4+6ness of INET6, they all follow the pattern that their name matches
the PF_* constant, minus the PF_ prefix.

Then there's the issue that everyone's existing code presumes that
::INET addresses are always AF_INET; this will no longer hold if it
changed. E.g. unpack_sockaddr_in will get upset given an AF_INET6. The
advantage of taking a new module name with a compatible _subset_ of API,
is that in most cases, that subset is sufficient; most people don't
expect to unpack_sockaddr_in( $sock->sockname ) because they'll use the
accessors. If it works for them, great; if not, they don't have to move
over to using it. I'd find making a new module with mostly-compatible
API much less prone to breaking existing stuff, than changing the very
ingrained semantics of something existing.

-- 
Paul "LeoNerd" Evans

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

Attachment: signature.asc
Description: Digital signature

Reply via email to