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

Re: Will the real Internals module please stand up?

by ysth (Canon)
on Mar 01, 2009 at 19:39 UTC ( #747336=note: print w/replies, xml ) Need Help??

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

Undocumented things in universal.c should not be depended on; they should only be used by core modules. They aren't documented on purpose, to allow them to be changed whenever and however necessary. For those purposes, the code is good enough documentation.
  • Comment on Re: Will the real Internals module please stand up?

Replies are listed 'Best First'.
Re^2: Will the real Internals module please stand up?
by ikegami (Pope) on Mar 01, 2009 at 20:30 UTC

    Some are documented

    version::newundocumented availability
    version::qvundocumented availability
    version::booleancompletely undocumented
    version::vcmpcompletely undocumented
    version::noopcompletely undocumented
    version's UNIVERSAL::VERSION overrideundocumented availability
    utf8::native_to_unicodecompletely undocumented
    utf8::unicode_to_nativecompletely undocumented
    Internals::SvREADONLYcompletely undocumented
    Internals::SvREFCNTcompletely undocumented
    Internals::hv_clear_placeholderscompletely undocumented
    Internals::hash_seedcompletely undocumented
    Internals::rehash_seedcompletely undocumented
    Internals::HvREHASHcompletely undocumented
    PerlIO::get_layersundocumented availability
    re::is_regexpundocumented availability
    re::regnameundocumented availability
    re::regnamesundocumented availability
    re::regnames_countundocumented availability
    Tie::Hash::NamedCapture::undocumented availability

    The table applies to 5.10.0. I omitted methods except those in UNIVERSAL (since those have a global effect).


    documentedThese functions are documented as always available.
    impliedThe documentation for these functions implies they are always available.
    undocumented availabilityThese functions are documented, but their availability isn't.
    completely undocumentedThe documentation of the modules for these functions don't mention them.

    Interestingly, version claims to override UNIVERSAL::VERSION, but there is only one function. The "override" is always in effect.

    Interestingly, the following bindings are absent:

    • re::regmust
    • re::regexp_pattern

      What do you mean about "bindings are absent"?

      Most of this stuff, in particular availability, is not documented directly for a reason. So for instance Tie::Hash::NamedCapture is used to implement named captures. It is loaded automagically by the internals when you do a $+{foo} style lookup. It uses a bunch of the re:: functions, which are exposed via universal because they are then compiled into the core executable and thus do not require an additional library to be loaded. Now I could have implemented the entire thing without using any perl level modules or exposing any subs, but that would have limited the options available to the programmer which I felt was not the Perl way.


        I just saw this now for the first time.

        What do you mean about "bindings are absent"?

        Don't know.

        re::regexp_pattern is defined in 5.10.0's universal.c and it's bound to the Perl namespace.

        re::regmust isn't defined in 5.10.0's universal.c, so why was it mentioned?

        Maybe I was looking at the wrong file version?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747336]
[marto]: Corion, I'll talk to you later, but that are is generally fine :)
[hippo]: Just not sure that the expense and hassle is worth the benefit.
[LanX]: expense? .... meeting ppl is inspiring ...
[LanX]: ... and it might be your last chance ... I heard Perl is dead! OO

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2018-06-20 09:39 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.