{
    "mode": "perldoc",
    "parameter": "Internals",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Internals/json",
    "generated": "2026-06-17T13:17:52Z",
    "synopsis": "$isro= Internals::SvREADONLY($x)\n$refcnt= Internals::SvREFCNT($x)\nhvclearplaceholders(%hash);",
    "sections": {
        "NAME": {
            "content": "Internals - Reserved special namespace for internals related functions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "$isro= Internals::SvREADONLY($x)\n$refcnt= Internals::SvREFCNT($x)\nhvclearplaceholders(%hash);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Internals namespace is used by the core Perl development team to expose certain low level\ninternals routines for testing and other purposes.\n\nIn theory these routines were not and are not intended to be used outside of the perl core, and\nare subject to change and removal at any time.\n\nIn practice people have come to depend on these over the years, despite being historically\nundocumented, so we will provide some level of forward compatibility for some time. Nevertheless\nyou can assume that any routine documented here is experimental or deprecated and you should\nfind alternatives to their use.\n\nFUNCTIONS\nSvREFCNT(THING [, $value])\nHistorically Perl has been a refcounted language. This means that each variable tracks how\nmany things reference it, and when the variable is no longer referenced it will\nautomatically free itself. In theory Perl code should not have to care about this, and in a\nfuture version Perl might change to some other strategy, although in practice this is\nunlikely.\n\nThis function allows one to violate the abstraction of variables and get or set the refcount\nof a variable, and in generally is really only useful in code that is testing refcount\nbehavior.\n\n*NOTE* You are strongly discouraged from using this function in non-test code and especially\ndiscouraged from using the set form of this function. The results of doing so may result in\nsegmentation faults or other undefined behavior.\n\nSvREADONLY(THING, [, $value])\nSet or get whether a variable is readonly or not. Exactly what the readonly flag means\ndepend on the type of the variable affected and the version of perl used.\n\nYou are strongly discouraged from using this function directly. It is used by various core\nmodules, like \"Hash::Util\", and the \"constant\" pragma to implement higher-level behavior\nwhich should be used instead.\n\nSee the core implementation for the exact meaning of the readonly flag for each internal\nvariable type.\n",
            "subsections": [
                {
                    "name": "hv_clear_placeholders",
                    "content": "Clear any placeholders from a locked hash. Should not be used directly. You should use the\nwrapper functions provided by Hash::Util instead. As of 5.25 also available as \"\nHash::Util::clearplaceholders(%hash) \"\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "Perl core development team.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "perlguts Hash::Util constant universal.c\n",
            "subsections": []
        }
    },
    "summary": "Internals - Reserved special namespace for internals related functions",
    "flags": [],
    "examples": [],
    "see_also": []
}