AnyEvent and Strawberry perl issue

Steve Hay steve.m.hay at googlemail.com
Sun Mar 15 06:57:27 CET 2015


On 15 March 2015 at 02:00, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Sun, Mar 15, 2015 at 02:33:46AM +0100, Christian Walde <walde.christian at gmail.com> wrote:

>> On exactly what basis was the decision made that these two can be equivalent?
>
> Nobody seems to want to answer that, or to be able to answer that, but
> evidence is pretty strong that the basis was simply the string match between
> the symbol names.
>
> I think a case-by-case reasoning can be excluded with high probability
> because it would be pretty unlikely that all these codes would pass a more
> involved test (EINPROGRESS and EINVAL certainly shouldn't).
>

For my part, the recent changes that I made in relation to changes in
VC10 (http://perl5.git.perl.org/perl.git/commit/ea95436966) were
blindly following existing precedents in Errno.pm and POSIX.pm. I
didn't question them since they were of long standing, apparently
without problem. My focus was on fixing a (new) problem with changes
in VC10 and I had no obvious reason to go looking for whether there
might be existing problems that needed fixing too. With hindsight it
is easy to see that I should have dug deeper, but at the time it
simply wasn't on my radar.

The POSIX.pm mapping was added in 2009 (in 5.11.2)
(http://perl5.git.perl.org/perl.git/commit/2489f03d17) and seems to
have likewise just followed the existing precedent in Errno.pm
(judging by the comment added to POSIX.xs).

The Errno.pm mapping was added in 2001 (in 5.7.3)
(http://perl5.git.perl.org/perl.git/commit/4d70086c95). The author of
that change is sadly departed. I haven't yet searched through p5p
archives to see if there is any more detail on the matter there, but
the commit message simply says "Win32 hides some errno-oid constants
in <winsock.h> under assumed names. This gets them into Errno.pm - yet
to prove they end up in $!." This is the original code that defines
Errno::EINPROGRESS as WSAEINPROGRESS (10036) and hence causes breakage
in code shared between *nix and Windows when that winsock error code
is assigned to $! and compared to the Errno constant.



More information about the anyevent mailing list