Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Do you know where your variables are?
 
PerlMonks  

Re: Will the real Internals module please stand up?

by ikegami (Pope)
on Mar 01, 2009 at 19:49 UTC ( #747340=note: print w/ replies, xml ) Need Help??


in reply to Will the real Internals module please stand up?

The utf8:: functions can't be loaded by use utf8; since that's a pragma. I guess universal.c was a speedier alternative to making a module just to expose the utf8:: functions.


Comment on Re: Will the real Internals module please stand up?
Select or Download Code
Re^2: Will the real Internals module please stand up?
by ysth (Canon) on Mar 01, 2009 at 20:06 UTC
    They could have been included in the module, the same way that there are utility functions in the charnames pragma that you can load without triggering the pragma behavior via "use charnames ()" or "require charnames".

    So either it was just a "speedier alternative", as you say, or it was desired that the module not need to be loaded. I can't guess which.

      One reason to put things in universal.c is it allows you to use these functions in miniperl. If they are used by things that are run by miniperl or they are used to test perl then they need to be available early. Another reason is that functions are used to implement parts of perls internals, and therefore need to be around. An example is some of the re:: routines that are used to implement named captures. They need to be usable without loading the re dll, which also contains a full debugging enabled version of the regex engine.

      ---
      $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747340]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2014-04-17 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (453 votes), past polls