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

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.

Replies are listed 'Best First'.
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.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747340]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-05-24 01:15 GMT
Find Nodes?
    Voting Booth?