The particularly funny part was that AnyEvent::Socket does have that Socket::pack_sockaddr_un call in eval.

So I patched it:

--- Socket.pm 2012-09-27 13:27:38.856750000 +0200 +++ Socket.pm.win32 2012-09-27 13:28:45.466125000 +0200 @@ -579,7 +579,7 @@ module (C<format_address> converts it to # sockaddr_un structures of maximum length (which is not, AFAICS, req +uired # by any standard). try to 0-pad structures for the benefit of those +platforms. -my $sa_un_zero = eval { Socket::pack_sockaddr_un "" }; $sa_un_zero ^= + $sa_un_zero; +my $sa_un_zero = eval { Socket::pack_sockaddr_un "" } unless AnyEvent +::WIN32; $sa_un_zero ^= $sa_un_zero; sub unpack_sockaddr($) { my $af = sockaddr_family $_[0];

But actually, it wasn’t AnyEvent::Socket’s fault. One of the programs has a $SIG{__DIE__} override, while the other doesn’t; for debugging purposes (provides a nice-ish traceback) — and this broke the eval { } in AnyEvent::Socket.

Though, it doesn’t make sense to even attempt to run that function under Win32, so the patch isn’t really without sense.


In reply to Re^2: AnyEvent::HTTP and Socket on Windows by Ralesk
in thread AnyEvent::HTTP and Socket on Windows by Ralesk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.