Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Comment on


In a single-threaded perl, there is only one copy of stuff like current working directory, environment etc.

In a multi-threaded perl, each thread needs its own copy of that information.

So, for the single-threaded perl, the PERL_CONTEXT can be known at compile time and linked statically into code. A single static pointer to a struct that contains all the per-thread information is all that is required, because there is only one thread.

In a multi-threaded perl, each function that needs access to the "current PERL_CONTEXT" need to be able to find the appropriate context for the thread it is running in; hence it needs the my_perl variable which tells it which context that is.

In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

div class=

In reply to Re^3: Use perl type without perl by BrowserUk
in thread Use perl type without perl by xiaoyafeng

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (6)
    As of 2014-12-26 23:32 GMT
    Find Nodes?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?

      Results (176 votes), past polls