Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
laziness, impatience, and hubris
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
I was confused by this as well. My cause to delve into IO::Socket was a breakdown of my LWP modules.

Go to your Perl source can check out:

the directory ext/Errno

This is where these strings are actually obtained and made into the Errno.pm module which in turn gives rise to %!.

What is going on here is that at make time Errno_pm.PL actually checks the cpp output to get a list of headers to scan. This output comes from something along the lines of "cpp your cpp flags errno.c". "errno.c" has a single line "#include <errno.h> Then it will scan all of these header files for #defines. (check out /usr/lib/errno.h or /usr/lib/asm/errno.h if you have it). Taking these defines, it will write the code for "Errno.pm" which ultimately lives in "lib/perl5/5.6.0/<arch>/Errno.pm.

The values for %! are supplied via a tied hash from Errno.pm.

Why do I know this? Well because shipped with RedHat did not correctly report all of the headers to scan. When the IO::Socket went to test against $!{EINPROGRESS} it did not match. It was always giving me "Timeout" messages. :( After tracing this through I found the defective output from cpp and the rest is history.

You need the updated cpp that RedHat supplies. This version (dated Dec 18, 2000) works correctly.

J


In reply to Re: $! or &Errno or $!{} by jlawrenc
in thread $! or &Errno or $!{} by tadman

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (18)
    As of 2014-04-18 19:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (471 votes), past polls