Oh, that isn't the problem at all. You can already get the error code via 0+$! (and probably via 0+$^E). But you can't get a description for the error; not with the standard method used for $! [C's strerror()] nor with the standard method used for $^E/GetLastError() [Win32::FormatMessage()] nor with any subroutine that I've found. They don't even have error descriptions in the comments in WinSock.h.
So my plan was to write error descriptions and put them into a module and patch Perl such that $! would know where to find these descriptioins when its regular method failed.
And that looks easier to you than using $! or $^E? Getting the error code isn't the hard part.
-
tye
(but my friends call me "Tye")
|