The compiler that built ActivePerl and your compiler use different C runtime libraries - and that *can* definitely be nasty - though, mostly, it's not an issue. And I think it's quite possibly *not* an issue here.

I've confirmed that the perl.exe process has two CRTL DLLs loaded: msvcr71.dll (7.10.6030.0000) and msvcrt.dll (7.00.2600.2180).

I surmise that both of these export errno and perl58.dll is linking to one and the Net/SSLeay.dll is linking to the other. Thus setting errno in Net/SSLeay.dll does not alter the value of $! in Perl. Indeed now I write this I seem to recall having heard of this exact issue elsewhere.

Anyway, none of this will help you much - except perhaps for the notion that your problem lies with Test::Exception, rather than Net::SSLeay per se.

Thanks, but having placed diagnostic prints of errno and $! just before the and after the return from the XS code and I'm sure I've isolated (and circumvented) this problem. I think it will turn out to be the first of many getting Net::SSLeay to work (see Legacy use of splice() as lvalue).


In reply to Re^2: errno in XS not propagating to $! - breaks Net::SSLeay by nobull
in thread errno in XS not propagating to $! - breaks Net::SSLeay by nobull

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.