1PERLINTERN(1)          Perl Programmers Reference Guide          PERLINTERN(1)
2
3
4

NAME

6       perlintern - autogenerated documentation of purely internal
7       Perl functions
8

DESCRIPTION

10       This file is the autogenerated documentation of functions in the Perl
11       interpreter that are documented using Perl's internal documentation
12       format but are not marked as part of the Perl API. In other words, they
13       are not for use in extensions!
14

CV reference counts and CvOUTSIDE

16       CvWEAKOUTSIDE
17               Each CV has a pointer, "CvOUTSIDE()", to its lexically
18               enclosing CV (if any). Because pointers to anonymous sub
19               prototypes are stored in "&" pad slots, it is a possible to get
20               a circular reference, with the parent pointing to the child and
21               vice-versa. To avoid the ensuing memory leak, we do not
22               increment the reference count of the CV pointed to by
23               "CvOUTSIDE" in the one specific instance that the parent has a
24               "&" pad slot pointing back to us. In this case, we set the
25               "CvWEAKOUTSIDE" flag in the child. This allows us to determine
26               under what circumstances we should decrement the refcount of
27               the parent when freeing the child.
28
29               There is a further complication with non-closure anonymous subs
30               (i.e. those that do not refer to any lexicals outside that
31               sub). In this case, the anonymous prototype is shared rather
32               than being cloned. This has the consequence that the parent may
33               be freed while there are still active children, eg
34
35                   BEGIN { $a = sub { eval '$x' } }
36
37               In this case, the BEGIN is freed immediately after execution
38               since there are no active references to it: the anon sub
39               prototype has "CvWEAKOUTSIDE" set since it's not a closure, and
40               $a points to the same CV, so it doesn't contribute to BEGIN's
41               refcount either.  When $a is executed, the "eval '$x'" causes
42               the chain of "CvOUTSIDE"s to be followed, and the freed BEGIN
43               is accessed.
44
45               To avoid this, whenever a CV and its associated pad is freed,
46               any "&" entries in the pad are explicitly removed from the pad,
47               and if the refcount of the pointed-to anon sub is still
48               positive, then that child's "CvOUTSIDE" is set to point to its
49               grandparent. This will only occur in the single specific case
50               of a non-closure anon prototype having one or more active
51               references (such as $a above).
52
53               One other thing to consider is that a CV may be merely
54               undefined rather than freed, eg "undef &foo". In this case, its
55               refcount may not have reached zero, but we still delete its pad
56               and its "CvROOT" etc.  Since various children may still have
57               their "CvOUTSIDE" pointing at this undefined CV, we keep its
58               own "CvOUTSIDE" for the time being, so that the chain of
59               lexical scopes is unbroken. For example, the following should
60               print 123:
61
62                   my $x = 123;
63                   sub tmp { sub { eval '$x' } }
64                   my $a = tmp();
65                   undef &tmp;
66                   print  $a->();
67
68                       bool    CvWEAKOUTSIDE(CV *cv)
69

Functions in file pad.h

71       CX_CURPAD_SAVE
72               Save the current pad in the given context block structure.
73
74                       void    CX_CURPAD_SAVE(struct context)
75
76       CX_CURPAD_SV
77               Access the SV at offset po in the saved current pad in the
78               given context block structure (can be used as an lvalue).
79
80                       SV *    CX_CURPAD_SV(struct context, PADOFFSET po)
81
82       PAD_BASE_SV
83               Get the value from slot "po" in the base (DEPTH=1) pad of a
84               padlist
85
86                       SV *    PAD_BASE_SV(PADLIST padlist, PADOFFSET po)
87
88       PAD_CLONE_VARS
89               Clone the state variables associated with running and compiling
90               pads.
91
92                       void    PAD_CLONE_VARS(PerlInterpreter *proto_perl, CLONE_PARAMS* param)
93
94       PAD_COMPNAME_FLAGS
95               Return the flags for the current compiling pad name at offset
96               "po". Assumes a valid slot entry.
97
98                       U32     PAD_COMPNAME_FLAGS(PADOFFSET po)
99
100       PAD_COMPNAME_GEN
101               The generation number of the name at offset "po" in the current
102               compiling pad (lvalue). Note that "SvUVX" is hijacked for this
103               purpose.
104
105                       STRLEN  PAD_COMPNAME_GEN(PADOFFSET po)
106
107       PAD_COMPNAME_GEN_set
108               Sets the generation number of the name at offset "po" in the
109               current ling pad (lvalue) to "gen".  Note that "SvUV_set" is
110               hijacked for this purpose.
111
112                       STRLEN  PAD_COMPNAME_GEN_set(PADOFFSET po, int gen)
113
114       PAD_COMPNAME_OURSTASH
115               Return the stash associated with an "our" variable.  Assumes
116               the slot entry is a valid "our" lexical.
117
118                       HV *    PAD_COMPNAME_OURSTASH(PADOFFSET po)
119
120       PAD_COMPNAME_PV
121               Return the name of the current compiling pad name at offset
122               "po". Assumes a valid slot entry.
123
124                       char *  PAD_COMPNAME_PV(PADOFFSET po)
125
126       PAD_COMPNAME_TYPE
127               Return the type (stash) of the current compiling pad name at
128               offset "po". Must be a valid name. Returns null if not typed.
129
130                       HV *    PAD_COMPNAME_TYPE(PADOFFSET po)
131
132       PAD_DUP Clone a padlist.
133
134                       void    PAD_DUP(PADLIST dstpad, PADLIST srcpad, CLONE_PARAMS* param)
135
136       PAD_RESTORE_LOCAL
137               Restore the old pad saved into the local variable opad by
138               PAD_SAVE_LOCAL()
139
140                       void    PAD_RESTORE_LOCAL(PAD *opad)
141
142       PAD_SAVE_LOCAL
143               Save the current pad to the local variable opad, then make the
144               current pad equal to npad
145
146                       void    PAD_SAVE_LOCAL(PAD *opad, PAD *npad)
147
148       PAD_SAVE_SETNULLPAD
149               Save the current pad then set it to null.
150
151                       void    PAD_SAVE_SETNULLPAD()
152
153       PAD_SETSV
154               Set the slot at offset "po" in the current pad to "sv"
155
156                       SV *    PAD_SETSV(PADOFFSET po, SV* sv)
157
158       PAD_SET_CUR
159               Set the current pad to be pad "n" in the padlist, saving the
160               previous current pad. NB currently this macro expands to a
161               string too long for some compilers, so it's best to replace it
162               with
163
164                   SAVECOMPPAD();
165                   PAD_SET_CUR_NOSAVE(padlist,n);
166
167
168                       void    PAD_SET_CUR(PADLIST padlist, I32 n)
169
170       PAD_SET_CUR_NOSAVE
171               like PAD_SET_CUR, but without the save
172
173                       void    PAD_SET_CUR_NOSAVE(PADLIST padlist, I32 n)
174
175       PAD_SV  Get the value at offset "po" in the current pad
176
177                       void    PAD_SV(PADOFFSET po)
178
179       PAD_SVl Lightweight and lvalue version of "PAD_SV".  Get or set the
180               value at offset "po" in the current pad.  Unlike "PAD_SV", does
181               not print diagnostics with -DX.  For internal use only.
182
183                       SV *    PAD_SVl(PADOFFSET po)
184
185       SAVECLEARSV
186               Clear the pointed to pad value on scope exit. (i.e. the runtime
187               action of 'my')
188
189                       void    SAVECLEARSV(SV **svp)
190
191       SAVECOMPPAD
192               save PL_comppad and PL_curpad
193
194                       void    SAVECOMPPAD()
195
196       SAVEPADSV
197               Save a pad slot (used to restore after an iteration)
198
199               XXX DAPM it would make more sense to make the arg a PADOFFSET
200                    void SAVEPADSV(PADOFFSET po)
201

Functions in file pp_ctl.c

203       docatch Check for the cases 0 or 3 of cur_env.je_ret, only used inside
204               an eval context.
205
206               0 is used as continue inside eval,
207
208               3 is used for a die caught by an inner eval - continue inner
209               loop
210
211               See cop.h: je_mustcatch, when set at any runlevel to TRUE,
212               means eval ops must establish a local jmpenv to handle
213               exception traps.
214
215                       OP*     docatch(OP *o)
216

GV Functions

218       gv_try_downgrade
219               If the typeglob "gv" can be expressed more succinctly, by
220               having something other than a real GV in its place in the
221               stash, replace it with the optimised form.  Basic requirements
222               for this are that "gv" is a real typeglob, is sufficiently
223               ordinary, and is only referenced from its package.  This
224               function is meant to be used when a GV has been looked up in
225               part to see what was there, causing upgrading, but based on
226               what was found it turns out that the real GV isn't required
227               after all.
228
229               If "gv" is a completely empty typeglob, it is deleted from the
230               stash.
231
232               If "gv" is a typeglob containing only a sufficiently-ordinary
233               constant sub, the typeglob is replaced with a scalar-reference
234               placeholder that more compactly represents the same thing.
235
236               NOTE: this function is experimental and may change or be
237               removed without notice.
238
239                       void    gv_try_downgrade(GV* gv)
240
241       is_gv_magical_sv
242               Returns "TRUE" if given the name of a magical GV.
243
244               Currently only useful internally when determining if a GV
245               should be created even in rvalue contexts.
246
247               "flags" is not used at present but available for future
248               extension to allow selecting particular classes of magical
249               variable.
250
251               Currently assumes that "name" is NUL terminated (as well as len
252               being valid).  This assumption is met by all callers within the
253               perl core, which all pass pointers returned by SvPV.
254
255                       bool    is_gv_magical_sv(SV *const name_sv, U32 flags)
256

Hash Manipulation Functions

258       refcounted_he_chain_2hv
259               Generates and returns a "HV *" by walking up the tree starting
260               at the passed in "struct refcounted_he *".
261
262               NOTE: this function is experimental and may change or be
263               removed without notice.
264
265                       HV *    refcounted_he_chain_2hv(const struct refcounted_he *c)
266
267       refcounted_he_free
268               Decrements the reference count of the passed in "struct
269               refcounted_he *" by one. If the reference count reaches zero
270               the structure's memory is freed, and "refcounted_he_free"
271               iterates onto the parent node.
272
273               NOTE: this function is experimental and may change or be
274               removed without notice.
275
276                       void    refcounted_he_free(struct refcounted_he *he)
277
278       refcounted_he_new
279               Creates a new "struct refcounted_he". As key is copied, and
280               value is stored in a compact form, all references remain the
281               property of the caller.  The "struct refcounted_he" is returned
282               with a reference count of 1.
283
284               NOTE: this function is experimental and may change or be
285               removed without notice.
286
287                       struct refcounted_he *  refcounted_he_new(struct refcounted_he *const parent, SV *const key, SV *const value)
288

IO Functions

290       start_glob
291               Function called by "do_readline" to spawn a glob (or do the
292               glob inside perl on VMS). This code used to be inline, but now
293               perl uses "File::Glob" this glob starter is only used by
294               miniperl during the build process.  Moving it away shrinks
295               pp_hot.c; shrinking pp_hot.c helps speed perl up.
296
297               NOTE: this function is experimental and may change or be
298               removed without notice.
299
300                       PerlIO* start_glob(SV *tmpglob, IO *io)
301

Magical Functions

303       magic_clearhint
304               Triggered by a delete from %^H, records the key to
305               "PL_compiling.cop_hints_hash".
306
307                       int     magic_clearhint(SV* sv, MAGIC* mg)
308
309       magic_clearhints
310               Triggered by clearing %^H, resets
311               "PL_compiling.cop_hints_hash".
312
313                       int     magic_clearhints(SV* sv, MAGIC* mg)
314
315       magic_sethint
316               Triggered by a store to %^H, records the key/value pair to
317               "PL_compiling.cop_hints_hash".  It is assumed that hints aren't
318               storing anything that would need a deep copy.  Maybe we should
319               warn if we find a reference.
320
321                       int     magic_sethint(SV* sv, MAGIC* mg)
322
323       mg_localize
324               Copy some of the magic from an existing SV to new localized
325               version of that SV. Container magic (eg %ENV, $1, tie) gets
326               copied, value magic doesn't (eg taint, pos).
327
328               If setmagic is false then no set magic will be called on the
329               new (empty) SV.  This typically means that assignment will soon
330               follow (e.g. 'local $x = $y'), and that will handle the magic.
331
332                       void    mg_localize(SV* sv, SV* nsv, bool setmagic)
333

MRO Functions

335       mro_get_linear_isa_dfs
336               Returns the Depth-First Search linearization of @ISA the given
337               stash.  The return value is a read-only AV*.  "level" should be
338               0 (it is used internally in this function's recursion).
339
340               You are responsible for "SvREFCNT_inc()" on the return value if
341               you plan to store it anywhere semi-permanently (otherwise it
342               might be deleted out from under you the next time the cache is
343               invalidated).
344
345                       AV*     mro_get_linear_isa_dfs(HV* stash, U32 level)
346
347       mro_isa_changed_in
348               Takes the necessary steps (cache invalidations, mostly) when
349               the @ISA of the given package has changed.  Invoked by the
350               "setisa" magic, should not need to invoke directly.
351
352                       void    mro_isa_changed_in(HV* stash)
353

Pad Data Structures

355       CvPADLIST
356               CV's can have CvPADLIST(cv) set to point to an AV.
357
358               For these purposes "forms" are a kind-of CV, eval""s are too
359               (except they're not callable at will and are always thrown away
360               after the eval"" is done executing). Require'd files are simply
361               evals without any outer lexical scope.
362
363               XSUBs don't have CvPADLIST set - dXSTARG fetches values from
364               PL_curpad, but that is really the callers pad (a slot of which
365               is allocated by every entersub).
366
367               The CvPADLIST AV has does not have AvREAL set, so REFCNT of
368               component items is managed "manual" (mostly in pad.c) rather
369               than normal av.c rules.  The items in the AV are not SVs as for
370               a normal AV, but other AVs:
371
372               0'th Entry of the CvPADLIST is an AV which represents the
373               "names" or rather the "static type information" for lexicals.
374
375               The CvDEPTH'th entry of CvPADLIST AV is an AV which is the
376               stack frame at that depth of recursion into the CV.  The 0'th
377               slot of a frame AV is an AV which is @_.  other entries are
378               storage for variables and op targets.
379
380               During compilation: "PL_comppad_name" is set to the names AV.
381               "PL_comppad" is set to the frame AV for the frame CvDEPTH == 1.
382               "PL_curpad" is set to the body of the frame AV (i.e.
383               AvARRAY(PL_comppad)).
384
385               During execution, "PL_comppad" and "PL_curpad" refer to the
386               live frame of the currently executing sub.
387
388               Iterating over the names AV iterates over all possible pad
389               items. Pad slots that are SVs_PADTMP (targets/GVs/constants)
390               end up having &PL_sv_undef "names" (see pad_alloc()).
391
392               Only my/our variable (SVs_PADMY/SVs_PADOUR) slots get valid
393               names.  The rest are op targets/GVs/constants which are
394               statically allocated or resolved at compile time.  These don't
395               have names by which they can be looked up from Perl code at run
396               time through eval"" like my/our variables can be.  Since they
397               can't be looked up by "name" but only by their index allocated
398               at compile time (which is usually in PL_op->op_targ), wasting a
399               name SV for them doesn't make sense.
400
401               The SVs in the names AV have their PV being the name of the
402               variable.  xlow+1..xhigh inclusive in the NV union is a range
403               of cop_seq numbers for which the name is valid.  For typed
404               lexicals name SV is SVt_PVMG and SvSTASH points at the type.
405               For "our" lexicals, the type is also SVt_PVMG, with the
406               SvOURSTASH slot pointing at the stash of the associated global
407               (so that duplicate "our" declarations in the same package can
408               be detected).  SvUVX is sometimes hijacked to store the
409               generation number during compilation.
410
411               If SvFAKE is set on the name SV, then that slot in the frame AV
412               is a REFCNT'ed reference to a lexical from "outside". In this
413               case, the name SV does not use xlow and xhigh to store a
414               cop_seq range, since it is in scope throughout. Instead xhigh
415               stores some flags containing info about the real lexical (is it
416               declared in an anon, and is it capable of being instantiated
417               multiple times?), and for fake ANONs, xlow contains the index
418               within the parent's pad where the lexical's value is stored, to
419               make cloning quicker.
420
421               If the 'name' is '&' the corresponding entry in frame AV is a
422               CV representing a possible closure.  (SvFAKE and name of '&' is
423               not a meaningful combination currently but could become so if
424               "my sub foo {}" is implemented.)
425
426               Note that formats are treated as anon subs, and are cloned each
427               time write is called (if necessary).
428
429               The flag SVs_PADSTALE is cleared on lexicals each time the my()
430               is executed, and set on scope exit. This allows the 'Variable
431               $x is not available' warning to be generated in evals, such as
432
433                   { my $x = 1; sub f { eval '$x'} } f();
434
435               For state vars, SVs_PADSTALE is overloaded to mean 'not yet
436               initialised'
437
438                       AV *    CvPADLIST(CV *cv)
439
440       cv_clone
441               Clone a CV: make a new CV which points to the same code etc,
442               but which has a newly-created pad built by copying the
443               prototype pad and capturing any outer lexicals.
444
445                       CV*     cv_clone(CV* proto)
446
447       cv_dump dump the contents of a CV
448
449                       void    cv_dump(const CV *cv, const char *title)
450
451       do_dump_pad
452               Dump the contents of a padlist
453
454                       void    do_dump_pad(I32 level, PerlIO *file, PADLIST *padlist, int full)
455
456       intro_my
457               "Introduce" my variables to visible status.
458
459                       U32     intro_my()
460
461       pad_add_anon
462               Add an anon code entry to the current compiling pad
463
464                       PADOFFSET       pad_add_anon(SV* sv, OPCODE op_type)
465
466       pad_add_name
467               Create a new name and associated PADMY SV in the current pad;
468               return the offset.  If "typestash" is valid, the name is for a
469               typed lexical; set the name's stash to that value.  If
470               "ourstash" is valid, it's an our lexical, set the name's
471               SvOURSTASH to that value
472
473               If fake, it means we're cloning an existing entry
474
475               NOTE: this function is experimental and may change or be
476               removed without notice.
477
478                       PADOFFSET       pad_add_name(const char *name, const STRLEN len, const U32 flags, HV *typestash, HV *ourstash)
479
480       pad_alloc
481               Allocate a new my or tmp pad entry. For a my, simply push a
482               null SV onto the end of PL_comppad, but for a tmp, scan the pad
483               from PL_padix upwards for a slot which has no name and no
484               active value.
485
486                       PADOFFSET       pad_alloc(I32 optype, U32 tmptype)
487
488       pad_block_start
489               Update the pad compilation state variables on entry to a new
490               block
491
492                       void    pad_block_start(int full)
493
494       pad_check_dup
495               Check for duplicate declarations: report any of:
496                    * a my in the current scope with the same name;
497                    * an our (anywhere in the pad) with the same name and the
498               same stash
499                      as "ourstash" "is_our" indicates that the name to check
500               is an 'our' declaration
501
502                       void    pad_check_dup(SV *name, const U32 flags, const HV *ourstash)
503
504       pad_findlex
505               Find a named lexical anywhere in a chain of nested pads. Add
506               fake entries in the inner pads if it's found in an outer one.
507
508               Returns the offset in the bottom pad of the lex or the fake
509               lex.  cv is the CV in which to start the search, and seq is the
510               current cop_seq to match against. If warn is true, print
511               appropriate warnings.  The out_* vars return values, and so are
512               pointers to where the returned values should be stored.
513               out_capture, if non-null, requests that the innermost instance
514               of the lexical is captured; out_name_sv is set to the innermost
515               matched namesv or fake namesv; out_flags returns the flags
516               normally associated with the IVX field of a fake namesv.
517
518               Note that pad_findlex() is recursive; it recurses up the chain
519               of CVs, then comes back down, adding fake entries as it goes.
520               It has to be this way because fake namesvs in anon protoypes
521               have to store in xlow the index into the parent pad.
522
523                       PADOFFSET       pad_findlex(const char *name, const CV* cv, U32 seq, int warn, SV** out_capture, SV** out_name_sv, int *out_flags)
524
525       pad_fixup_inner_anons
526               For any anon CVs in the pad, change CvOUTSIDE of that CV from
527               old_cv to new_cv if necessary. Needed when a newly-compiled CV
528               has to be moved to a pre-existing CV struct.
529
530                       void    pad_fixup_inner_anons(PADLIST *padlist, CV *old_cv, CV *new_cv)
531
532       pad_free
533               Free the SV at offset po in the current pad.
534
535                       void    pad_free(PADOFFSET po)
536
537       pad_leavemy
538               Cleanup at end of scope during compilation: set the max seq
539               number for lexicals in this scope and warn of any lexicals that
540               never got introduced.
541
542                       void    pad_leavemy()
543
544       pad_new Create a new compiling padlist, saving and updating the various
545               global vars at the same time as creating the pad itself. The
546               following flags can be OR'ed together:
547
548                   padnew_CLONE        this pad is for a cloned CV
549                   padnew_SAVE         save old globals
550                   padnew_SAVESUB      also save extra stuff for start of sub
551
552                       PADLIST*        pad_new(int flags)
553
554       pad_push
555               Push a new pad frame onto the padlist, unless there's already a
556               pad at this depth, in which case don't bother creating a new
557               one.  Then give the new pad an @_ in slot zero.
558
559                       void    pad_push(PADLIST *padlist, int depth)
560
561       pad_reset
562               Mark all the current temporaries for reuse
563
564                       void    pad_reset()
565
566       pad_setsv
567               Set the entry at offset po in the current pad to sv.  Use the
568               macro PAD_SETSV() rather than calling this function directly.
569
570                       void    pad_setsv(PADOFFSET po, SV* sv)
571
572       pad_swipe
573               Abandon the tmp in the current pad at offset po and replace
574               with a new one.
575
576                       void    pad_swipe(PADOFFSET po, bool refadjust)
577
578       pad_tidy
579               Tidy up a pad after we've finished compiling it:
580                   * remove most stuff from the pads of anonsub prototypes;
581                   * give it a @_;
582                   * mark tmps as such.
583
584                       void    pad_tidy(padtidy_type type)
585
586       pad_undef
587               Free the padlist associated with a CV.  If parts of it happen
588               to be current, we null the relevant PL_*pad* global vars so
589               that we don't have any dangling references left.  We also
590               repoint the CvOUTSIDE of any about-to-be-orphaned inner subs to
591               the outer of this cv.
592
593               (This function should really be called pad_free, but the name
594               was already taken)
595
596                       void    pad_undef(CV* cv)
597

Per-Interpreter Variables

599       PL_DBsingle
600               When Perl is run in debugging mode, with the -d switch, this SV
601               is a boolean which indicates whether subs are being single-
602               stepped.  Single-stepping is automatically turned on after
603               every step.  This is the C variable which corresponds to Perl's
604               $DB::single variable.  See "PL_DBsub".
605
606                       SV *    PL_DBsingle
607
608       PL_DBsub
609               When Perl is run in debugging mode, with the -d switch, this GV
610               contains the SV which holds the name of the sub being debugged.
611               This is the C variable which corresponds to Perl's $DB::sub
612               variable.  See "PL_DBsingle".
613
614                       GV *    PL_DBsub
615
616       PL_DBtrace
617               Trace variable used when Perl is run in debugging mode, with
618               the -d switch.  This is the C variable which corresponds to
619               Perl's $DB::trace variable.  See "PL_DBsingle".
620
621                       SV *    PL_DBtrace
622
623       PL_dowarn
624               The C variable which corresponds to Perl's $^W warning
625               variable.
626
627                       bool    PL_dowarn
628
629       PL_last_in_gv
630               The GV which was last used for a filehandle input operation.
631               ("<FH>")
632
633                       GV*     PL_last_in_gv
634
635       PL_ofsgv
636               The glob containing the output field separator - "*," in Perl
637               space.
638
639                       GV*     PL_ofsgv
640
641       PL_rs   The input record separator - $/ in Perl space.
642
643                       SV*     PL_rs
644

Stack Manipulation Macros

646       djSP    Declare Just "SP". This is actually identical to "dSP", and
647               declares a local copy of perl's stack pointer, available via
648               the "SP" macro.  See "SP".  (Available for backward source code
649               compatibility with the old (Perl 5.005) thread model.)
650
651                               djSP;
652
653       LVRET   True if this op will be the return value of an lvalue
654               subroutine
655

SV Manipulation Functions

657       sv_add_arena
658               Given a chunk of memory, link it to the head of the list of
659               arenas, and split it into a list of free SVs.
660
661                       void    sv_add_arena(char *const ptr, const U32 size, const U32 flags)
662
663       sv_clean_all
664               Decrement the refcnt of each remaining SV, possibly triggering
665               a cleanup. This function may have to be called multiple times
666               to free SVs which are in complex self-referential hierarchies.
667
668                       I32     sv_clean_all()
669
670       sv_clean_objs
671               Attempt to destroy all objects not yet freed
672
673                       void    sv_clean_objs()
674
675       sv_free_arenas
676               Deallocate the memory used by all arenas. Note that all the
677               individual SV heads and bodies within the arenas must already
678               have been freed.
679
680                       void    sv_free_arenas()
681

SV-Body Allocation

683       sv_2num Return an SV with the numeric value of the source SV, doing any
684               necessary reference or overload conversion.  You must use the
685               "SvNUM(sv)" macro to access this function.
686
687               NOTE: this function is experimental and may change or be
688               removed without notice.
689
690                       SV*     sv_2num(SV *const sv)
691

Unicode Support

693       find_uninit_var
694               Find the name of the undefined variable (if any) that caused
695               the operator o to issue a "Use of uninitialized value" warning.
696               If match is true, only return a name if it's value matches
697               uninit_sv.  So roughly speaking, if a unary operator (such as
698               OP_COS) generates a warning, then following the direct child of
699               the op may yield an OP_PADSV or OP_GV that gives the name of
700               the undefined variable. On the other hand, with OP_ADD there
701               are two branches to follow, so we only print the variable name
702               if we get an exact match.
703
704               The name is returned as a mortal SV.
705
706               Assumes that PL_op is the op that originally triggered the
707               error, and that PL_comppad/PL_curpad points to the currently
708               executing pad.
709
710               NOTE: this function is experimental and may change or be
711               removed without notice.
712
713                       SV*     find_uninit_var(const OP *const obase, const SV *const uninit_sv, bool top)
714
715       report_uninit
716               Print appropriate "Use of uninitialized variable" warning
717
718                       void    report_uninit(const SV *uninit_sv)
719

Undocumented functions

721       These functions are currently undocumented:
722
723       F0convert
724       Slab_to_rw
725       add_data
726       add_utf16_textfilter
727       addmad
728       allocmy
729       amagic_cmp
730       amagic_cmp_locale
731       amagic_i_ncmp
732       amagic_ncmp
733       anonymise_cv
734       ao
735       append_elem
736       append_list
737       append_madprops
738       apply
739       apply_attrs
740       apply_attrs_my
741       av_reify
742       bad_type
743       bind_match
744       block_end
745       block_start
746       boot_core_PerlIO
747       boot_core_UNIVERSAL
748       boot_core_mro
749       bytes_to_uni
750       cando
751       check_type_and_open
752       check_uni
753       checkcomma
754       checkposixcc
755       ck_anoncode
756       ck_bitop
757       ck_concat
758       ck_defined
759       ck_delete
760       ck_die
761       ck_each
762       ck_eof
763       ck_eval
764       ck_exec
765       ck_exists
766       ck_exit
767       ck_ftst
768       ck_fun
769       ck_glob
770       ck_grep
771       ck_index
772       ck_join
773       ck_lfun
774       ck_listiob
775       ck_match
776       ck_method
777       ck_null
778       ck_open
779       ck_readline
780       ck_repeat
781       ck_require
782       ck_return
783       ck_rfun
784       ck_rvconst
785       ck_sassign
786       ck_select
787       ck_shift
788       ck_sort
789       ck_spair
790       ck_split
791       ck_subr
792       ck_substr
793       ck_svconst
794       ck_trunc
795       ck_unpack
796       ckwarn_common
797       cl_and
798       cl_anything
799       cl_init
800       cl_init_zero
801       cl_is_anything
802       cl_or
803       clear_placeholders
804       closest_cop
805       convert
806       cop_free
807       cr_textfilter
808       create_eval_scope
809       curmad
810       cv_ckproto_len
811       deb_curcv
812       deb_stack_all
813       deb_stack_n
814       debprof
815       debug_start_match
816       del_sv
817       delete_eval_scope
818       deprecate_commaless_var_list
819       destroy_matcher
820       die_where
821       div128
822       do_aexec
823       do_aexec5
824       do_chomp
825       do_chop
826       do_delete_local
827       do_eof
828       do_exec
829       do_exec3
830       do_execfree
831       do_ipcctl
832       do_ipcget
833       do_kv
834       do_msgrcv
835       do_msgsnd
836       do_oddball
837       do_op_xmldump
838       do_pmop_xmldump
839       do_print
840       do_readline
841       do_seek
842       do_semop
843       do_shmio
844       do_smartmatch
845       do_sysseek
846       do_tell
847       do_trans
848       do_trans_complex
849       do_trans_complex_utf8
850       do_trans_count
851       do_trans_count_utf8
852       do_trans_simple
853       do_trans_simple_utf8
854       do_vecget
855       do_vecset
856       do_vop
857       doeval
858       dofile
859       dofindlabel
860       doform
861       dooneliner
862       doopen_pm
863       doparseform
864       dopoptoeval
865       dopoptogiven
866       dopoptolabel
867       dopoptoloop
868       dopoptosub_at
869       dopoptowhen
870       dump_all_perl
871       dump_exec_pos
872       dump_packsubs_perl
873       dump_sub_perl
874       dump_sv_child
875       dump_trie
876       dump_trie_interim_list
877       dump_trie_interim_table
878       dumpuntil
879       dup_attrlist
880       emulate_cop_io
881       exec_failed
882       expect_number
883       feature_is_enabled
884       filter_gets
885       find_and_forget_pmops
886       find_array_subscript
887       find_beginning
888       find_byclass
889       find_hash_subscript
890       find_in_my_stash
891       find_script
892       first_symbol
893       fold_constants
894       forbid_setid
895       force_ident
896       force_list
897       force_next
898       force_strict_version
899       force_version
900       force_word
901       forget_pmop
902       free_tied_hv_pool
903       gen_constant_list
904       get_arena
905       get_aux_mg
906       get_db_sub
907       get_debug_opts
908       get_hash_seed
909       get_isa_hash
910       get_no_modify
911       get_num
912       get_opargs
913       get_re_arg
914       getenv_len
915       glob_2number
916       glob_assign_glob
917       glob_assign_ref
918       group_end
919       gv_ename
920       gv_get_super_pkg
921       gv_init_sv
922       hfreeentries
923       hsplit
924       hv_auxinit
925       hv_backreferences_p
926       hv_copy_hints_hv
927       hv_delete_common
928       hv_kill_backrefs
929       hv_magic_check
930       hv_notallowed
931       incline
932       incpush
933       incpush_if_exists
934       incpush_use_sep
935       ingroup
936       init_argv_symbols
937       init_dbargs
938       init_debugger
939       init_ids
940       init_interp
941       init_main_stash
942       init_perllib
943       init_postdump_symbols
944       init_predump_symbols
945       intuit_method
946       intuit_more
947       invert
948       io_close
949       is_an_int
950       is_handle_constructor
951       is_inplace_av
952       is_list_assignment
953       is_utf8_X_L
954       is_utf8_X_LV
955       is_utf8_X_LVT
956       is_utf8_X_LV_LVT_V
957       is_utf8_X_T
958       is_utf8_X_V
959       is_utf8_X_begin
960       is_utf8_X_extend
961       is_utf8_X_non_hangul
962       is_utf8_X_prepend
963       is_utf8_char_slow
964       is_utf8_common
965       isa_lookup
966       jmaybe
967       join_exact
968       keyword
969       keyword_plugin_standard
970       lex_end
971       lex_start
972       linklist
973       list
974       listkids
975       localize
976       looks_like_bool
977       lop
978       mad_free
979       madlex
980       madparse
981       magic_clear_all_env
982       magic_clearenv
983       magic_clearisa
984       magic_clearpack
985       magic_clearsig
986       magic_existspack
987       magic_freearylen_p
988       magic_freeovrld
989       magic_get
990       magic_getarylen
991       magic_getdefelem
992       magic_getnkeys
993       magic_getpack
994       magic_getpos
995       magic_getsig
996       magic_getsubstr
997       magic_gettaint
998       magic_getuvar
999       magic_getvec
1000       magic_killbackrefs
1001       magic_len
1002       magic_methcall
1003       magic_methpack
1004       magic_nextpack
1005       magic_regdata_cnt
1006       magic_regdatum_get
1007       magic_regdatum_set
1008       magic_scalarpack
1009       magic_set
1010       magic_set_all_env
1011       magic_setamagic
1012       magic_setarylen
1013       magic_setcollxfrm
1014       magic_setdbline
1015       magic_setdefelem
1016       magic_setenv
1017       magic_setisa
1018       magic_setmglob
1019       magic_setnkeys
1020       magic_setpack
1021       magic_setpos
1022       magic_setregexp
1023       magic_setsig
1024       magic_setsubstr
1025       magic_settaint
1026       magic_setutf8
1027       magic_setuvar
1028       magic_setvec
1029       magic_sizepack
1030       magic_wipepack
1031       make_matcher
1032       make_trie
1033       make_trie_failtable
1034       malloc_good_size
1035       malloced_size
1036       matcher_matches_sv
1037       measure_struct
1038       mem_collxfrm
1039       mem_log_common
1040       mess_alloc
1041       method_common
1042       missingterm
1043       mod
1044       mode_from_discipline
1045       modkids
1046       more_bodies
1047       more_sv
1048       mro_meta_dup
1049       mro_meta_init
1050       mul128
1051       mulexp10
1052       my_attrs
1053       my_betoh16
1054       my_betoh32
1055       my_betoh64
1056       my_betohi
1057       my_betohl
1058       my_betohs
1059       my_clearenv
1060       my_exit_jump
1061       my_htobe16
1062       my_htobe32
1063       my_htobe64
1064       my_htobei
1065       my_htobel
1066       my_htobes
1067       my_htole16
1068       my_htole32
1069       my_htole64
1070       my_htolei
1071       my_htolel
1072       my_htoles
1073       my_kid
1074       my_letoh16
1075       my_letoh32
1076       my_letoh64
1077       my_letohi
1078       my_letohl
1079       my_letohs
1080       my_swabn
1081       my_unexec
1082       need_utf8
1083       newDEFSVOP
1084       newGIVWHENOP
1085       newGP
1086       newMADPROP
1087       newMADsv
1088       newTOKEN
1089       new_constant
1090       new_he
1091       new_logop
1092       new_warnings_bitfield
1093       next_symbol
1094       nextargv
1095       nextchar
1096       no_bareword_allowed
1097       no_fh_allowed
1098       no_op
1099       not_a_number
1100       nuke_stacks
1101       num_overflow
1102       offer_nice_chunk
1103       oopsAV
1104       oopsHV
1105       op_clear
1106       op_const_sv
1107       op_getmad
1108       op_getmad_weak
1109       op_refcnt_dec
1110       op_refcnt_inc
1111       op_xmldump
1112       open_script
1113       opt_scalarhv
1114       pack_rec
1115       package
1116       package_version
1117       pad_add_name_sv
1118       pad_compname_type
1119       pad_peg
1120       parse_body
1121       parse_unicode_opts
1122       parser_free
1123       path_is_absolute
1124       peep
1125       pending_Slabs_to_ro
1126       pidgone
1127       pm_description
1128       pmflag
1129       pmop_xmldump
1130       pmruntime
1131       pmtrans
1132       prepend_elem
1133       prepend_madprops
1134       printbuf
1135       process_special_blocks
1136       ptr_table_find
1137       put_byte
1138       qerror
1139       qsortsvu
1140       re_croak2
1141       readpipe_override
1142       ref_array_or_hash
1143       refcounted_he_fetch
1144       refcounted_he_new_common
1145       refcounted_he_value
1146       refkids
1147       refto
1148       reg
1149       reg_check_named_buff_matched
1150       reg_named_buff
1151       reg_named_buff_iter
1152       reg_namedseq
1153       reg_node
1154       reg_numbered_buff_fetch
1155       reg_numbered_buff_length
1156       reg_numbered_buff_store
1157       reg_qr_package
1158       reg_recode
1159       reg_scan_name
1160       reg_skipcomment
1161       reg_temp_copy
1162       reganode
1163       regatom
1164       regbranch
1165       regclass
1166       regcppop
1167       regcppush
1168       regcurly
1169       regdump_extflags
1170       reghop3
1171       reghop4
1172       reghopmaybe3
1173       reginclass
1174       reginsert
1175       regmatch
1176       regpiece
1177       regpposixcc
1178       regprop
1179       regrepeat
1180       regtail
1181       regtail_study
1182       regtry
1183       reguni
1184       regwhite
1185       report_evil_fh
1186       require_tie_mod
1187       restore_magic
1188       rsignal_restore
1189       rsignal_save
1190       run_body
1191       run_user_filter
1192       rxres_free
1193       rxres_restore
1194       rxres_save
1195       same_dirent
1196       save_freeop
1197       save_hek_flags
1198       save_hints
1199       save_lines
1200       save_magic
1201       save_op
1202       save_pushi32ptr
1203       save_pushptri32ptr
1204       save_pushptrptr
1205       save_scalar_at
1206       sawparens
1207       scalar
1208       scalar_mod_type
1209       scalarboolean
1210       scalarkids
1211       scalarseq
1212       scalarvoid
1213       scan_commit
1214       scan_const
1215       scan_formline
1216       scan_heredoc
1217       scan_ident
1218       scan_inputsymbol
1219       scan_pat
1220       scan_str
1221       scan_subst
1222       scan_trans
1223       scan_word
1224       scope
1225       search_const
1226       sequence
1227       sequence_num
1228       sequence_tail
1229       share_hek_flags
1230       sighandler
1231       simplify_sort
1232       skipspace
1233       skipspace0
1234       skipspace1
1235       skipspace2
1236       softref2xv
1237       sortcv
1238       sortcv_stacked
1239       sortcv_xsub
1240       space_join_names_mortal
1241       start_force
1242       stdize_locale
1243       store_cop_label
1244       strip_return
1245       study_chunk
1246       sub_crush_depth
1247       sublex_done
1248       sublex_push
1249       sublex_start
1250       sv_2iuv_common
1251       sv_2iuv_non_preserve
1252       sv_add_backref
1253       sv_catxmlpvn
1254       sv_catxmlsv
1255       sv_del_backref
1256       sv_dup_inc_multiple
1257       sv_exp_grow
1258       sv_free2
1259       sv_i_ncmp
1260       sv_kill_backrefs
1261       sv_ncmp
1262       sv_pos_b2u_midway
1263       sv_pos_u2b_cached
1264       sv_pos_u2b_forwards
1265       sv_pos_u2b_midway
1266       sv_release_COW
1267       sv_setsv_cow
1268       sv_unglob
1269       sv_xmlpeek
1270       swallow_bom
1271       swash_get
1272       to_byte_substr
1273       to_utf8_substr
1274       token_free
1275       token_getmad
1276       tokenize_use
1277       tokeq
1278       tokereport
1279       too_few_arguments
1280       too_many_arguments
1281       uiv_2buf
1282       unpack_rec
1283       unshare_hek
1284       unshare_hek_or_pvn
1285       unwind_handler_stack
1286       update_debugger_info
1287       usage
1288       utf16_textfilter
1289       utf8_mg_pos_cache_update
1290       utilize
1291       validate_suid
1292       varname
1293       vdie
1294       vdie_common
1295       vdie_croak_common
1296       visit
1297       vivify_defelem
1298       vivify_ref
1299       wait4pid
1300       watch
1301       write_no_mem
1302       write_to_stderr
1303       xmldump_all
1304       xmldump_all_perl
1305       xmldump_attr
1306       xmldump_eval
1307       xmldump_form
1308       xmldump_indent
1309       xmldump_packsubs
1310       xmldump_packsubs_perl
1311       xmldump_sub
1312       xmldump_sub_perl
1313       xmldump_vindent
1314       yyerror
1315       yylex
1316       yyparse
1317       yywarn
1318

AUTHORS

1320       The autodocumentation system was originally added to the Perl core by
1321       Benjamin Stuhl. Documentation is by whoever was kind enough to document
1322       their functions.
1323

SEE ALSO

1325       perlguts, perlapi
1326
1327
1328
1329perl v5.12.4                      2011-11-04                     PERLINTERN(1)
Impressum