Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Internals

Native Rust implementation built into the interpreter. Runtime: P5. See original documentation for the full Perl reference.

Functions

hv_clear_placeholders

perl5 universal.c:752-764 (XS_Internals_hv_clear_placehold) -> hv.c hv_clear_placeholders()

Removes all placeholder entries from a restricted hash. A placeholder is an HE whose hent_val == &PL_sv_placeholder.

svreadonly

query readonly flag

Internals::SvREADONLY($sv, $on) — set/clear readonly flag

perl5 universal.c:669-700 (XS_Internals_SvREADONLY)

Prototype: [$%@];$ arg0 is always a reference; we SvRV to get the referent. With 1 arg: returns &PL_sv_yes if READONLY, &PL_sv_no otherwise. With 2 args: if truthy, set SVf_READONLY and return yes;

         if falsy, clear SVf_READONLY and return no.

svrefcnt

return reference count

Internals::SvREFCNT($sv, $newcount) — set reference count (dangerous!)

perl5 universal.c:728-750 (XS_Internals_SvREFCNT)

Prototype: [$%@];$ Returns refcnt - 1 (minus the ref created by the backslash). With 2 args: sets SvREFCNT to $newcount + 1, returns $newcount.