IO::Socket->socketpair()

In the spirit of DWIM, shouldn't IO::Select->socketpair()
provide reasonable defaults for DOMAIN, TYPE, and PROTOCOL if it is
called with no arguments?

It seems like the vast majority of the time I see socketpair used,
it is with (AF_UNIX, SOCK_STREAM, PF_UNSPEC). Indeed, until recently I
didn't even know what they meant, it was just copy and paste by rote--which
I think makes them excellent candidates for being DWIMed away.

Thanks for any thoughts,

Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
xhoster [ Mo, 21 Mai 2007 21:25 ] [ ID #1716681 ]

Re: IO::Socket->socketpair()

>>>>> "x" == xhoster <xhoster [at] gmail.com> writes:

x> In the spirit of DWIM, shouldn't IO::Select->socketpair()
x> provide reasonable defaults for DOMAIN, TYPE, and PROTOCOL if it is
x> called with no arguments?

x> It seems like the vast majority of the time I see socketpair used,
x> it is with (AF_UNIX, SOCK_STREAM, PF_UNSPEC). Indeed, until recently I
x> didn't even know what they meant, it was just copy and paste by rote--which
x> I think makes them excellent candidates for being DWIMed away.

use pipe() instead as they are the same thing underneath these days in
at least unix flavors. $DEITY know what redmond does there.

uri

--
Uri Guttman ------ uri [at] stemsystems.com -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
Uri Guttman [ Mo, 21 Mai 2007 22:13 ] [ ID #1716682 ]
Perl » comp.lang.perl.modules » IO::Socket->socketpair()

Vorheriges Thema: AppConfig failure with ARGCOUNT_LIST
Nächstes Thema: Graphics Display Message board using Perl?