Tom Christiansen writes:
> >There are a number of good reasons to do this from an internals standpoint,
> >enough that I'd like to do it.
>
> Is one allowed to know that number, and those reasons? :-)
No idea what the internals reasons are. Here are my reasons:
* the current socket(), bind(), connect() etc are based VERY closely
around C, to the point of requiring C structures that are binary
data which you have to build using a separate module. So if you're
using them, you *already* load a module. Just put the bloody things
into that module. You wouldn't lose anything over how it's done
now.
* they take magic constants, just like the C function, that are mostly
the same. You know the difference between PF_INET and AF_INET, I
know the difference, but many people do not. And they shouldn't have
to. IO::Socket is a good start at Doing It Right instead of Doing
The Old Way With Lots of Constants And Arguments.
* the get*by* for networking stuff (hosts,services,etc) are so rarely
used they should be moved out. Yes, it's only a small win. But
every byte counts towards a smaller Perl, and moving getprotobyname()
to a module isn't the same as moving open().
Nat