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

Compile-time scope hooks

16       BhkENTRY
17               Return an entry from the BHK structure. which is a preprocessor
18               token indicating which entry to return. If the appropriate flag
19               is not set this will return NULL. The type of the return value
20               depends on which entry you ask for.
21
22               NOTE: this function is experimental and may change or be
23               removed without notice.
24
25                       void *  BhkENTRY(BHK *hk, which)
26
27       BhkFLAGS
28               Return the BHK's flags.
29
30               NOTE: this function is experimental and may change or be
31               removed without notice.
32
33                       U32     BhkFLAGS(BHK *hk)
34
35       CALL_BLOCK_HOOKS
36               Call all the registered block hooks for type which. which is a
37               preprocessing token; the type of arg depends on which.
38
39               NOTE: this function is experimental and may change or be
40               removed without notice.
41
42                       void    CALL_BLOCK_HOOKS(which, arg)
43

CV reference counts and CvOUTSIDE

45       CvWEAKOUTSIDE
46               Each CV has a pointer, "CvOUTSIDE()", to its lexically
47               enclosing CV (if any). Because pointers to anonymous sub
48               prototypes are stored in "&" pad slots, it is a possible to get
49               a circular reference, with the parent pointing to the child and
50               vice-versa. To avoid the ensuing memory leak, we do not
51               increment the reference count of the CV pointed to by
52               "CvOUTSIDE" in the one specific instance that the parent has a
53               "&" pad slot pointing back to us. In this case, we set the
54               "CvWEAKOUTSIDE" flag in the child. This allows us to determine
55               under what circumstances we should decrement the refcount of
56               the parent when freeing the child.
57
58               There is a further complication with non-closure anonymous subs
59               (i.e. those that do not refer to any lexicals outside that
60               sub). In this case, the anonymous prototype is shared rather
61               than being cloned. This has the consequence that the parent may
62               be freed while there are still active children, eg
63
64                   BEGIN { $a = sub { eval '$x' } }
65
66               In this case, the BEGIN is freed immediately after execution
67               since there are no active references to it: the anon sub
68               prototype has "CvWEAKOUTSIDE" set since it's not a closure, and
69               $a points to the same CV, so it doesn't contribute to BEGIN's
70               refcount either.  When $a is executed, the "eval '$x'" causes
71               the chain of "CvOUTSIDE"s to be followed, and the freed BEGIN
72               is accessed.
73
74               To avoid this, whenever a CV and its associated pad is freed,
75               any "&" entries in the pad are explicitly removed from the pad,
76               and if the refcount of the pointed-to anon sub is still
77               positive, then that child's "CvOUTSIDE" is set to point to its
78               grandparent. This will only occur in the single specific case
79               of a non-closure anon prototype having one or more active
80               references (such as $a above).
81
82               One other thing to consider is that a CV may be merely
83               undefined rather than freed, eg "undef &foo". In this case, its
84               refcount may not have reached zero, but we still delete its pad
85               and its "CvROOT" etc.  Since various children may still have
86               their "CvOUTSIDE" pointing at this undefined CV, we keep its
87               own "CvOUTSIDE" for the time being, so that the chain of
88               lexical scopes is unbroken. For example, the following should
89               print 123:
90
91                   my $x = 123;
92                   sub tmp { sub { eval '$x' } }
93                   my $a = tmp();
94                   undef &tmp;
95                   print  $a->();
96
97                       bool    CvWEAKOUTSIDE(CV *cv)
98

Embedding Functions

100       cv_dump dump the contents of a CV
101
102                       void    cv_dump(CV *cv, const char *title)
103
104       do_dump_pad
105               Dump the contents of a padlist
106
107                       void    do_dump_pad(I32 level, PerlIO *file,
108                                           PADLIST *padlist, int full)
109
110       intro_my
111               "Introduce" my variables to visible status.
112
113                       U32     intro_my()
114
115       padlist_dup
116               Duplicates a pad.
117
118                       AV *    padlist_dup(AV *srcpad, CLONE_PARAMS *param)
119
120       pad_alloc_name
121               Allocates a place in the currently-compiling pad (via
122               "pad_alloc" in perlapi) and then stores a name for that entry.
123               namesv is adopted and becomes the name entry; it must already
124               contain the name string and be sufficiently upgraded.
125               typestash and ourstash and the "padadd_STATE" flag get added to
126               namesv.  None of the other processing of "pad_add_name_pvn" in
127               perlapi is done.  Returns the offset of the allocated pad slot.
128
129                       PADOFFSET pad_alloc_name(SV *namesv, U32 flags,
130                                                HV *typestash, HV *ourstash)
131
132       pad_block_start
133               Update the pad compilation state variables on entry to a new
134               block
135
136                       void    pad_block_start(int full)
137
138       pad_check_dup
139               Check for duplicate declarations: report any of:
140
141                    * a my in the current scope with the same name;
142                    * an our (anywhere in the pad) with the same name and the
143                      same stash as C<ourstash>
144
145               "is_our" indicates that the name to check is an 'our'
146               declaration.
147
148                       void    pad_check_dup(SV *name, U32 flags,
149                                             const HV *ourstash)
150
151       pad_findlex
152               Find a named lexical anywhere in a chain of nested pads. Add
153               fake entries in the inner pads if it's found in an outer one.
154
155               Returns the offset in the bottom pad of the lex or the fake
156               lex.  cv is the CV in which to start the search, and seq is the
157               current cop_seq to match against. If warn is true, print
158               appropriate warnings.  The out_* vars return values, and so are
159               pointers to where the returned values should be stored.
160               out_capture, if non-null, requests that the innermost instance
161               of the lexical is captured; out_name_sv is set to the innermost
162               matched namesv or fake namesv; out_flags returns the flags
163               normally associated with the IVX field of a fake namesv.
164
165               Note that pad_findlex() is recursive; it recurses up the chain
166               of CVs, then comes back down, adding fake entries as it goes.
167               It has to be this way because fake namesvs in anon protoypes
168               have to store in xlow the index into the parent pad.
169
170                       PADOFFSET pad_findlex(const char *namepv,
171                                             STRLEN namelen, U32 flags,
172                                             const CV* cv, U32 seq, int warn,
173                                             SV** out_capture,
174                                             SV** out_name_sv, int *out_flags)
175
176       pad_fixup_inner_anons
177               For any anon CVs in the pad, change CvOUTSIDE of that CV from
178               old_cv to new_cv if necessary. Needed when a newly-compiled CV
179               has to be moved to a pre-existing CV struct.
180
181                       void    pad_fixup_inner_anons(PADLIST *padlist,
182                                                     CV *old_cv, CV *new_cv)
183
184       pad_free
185               Free the SV at offset po in the current pad.
186
187                       void    pad_free(PADOFFSET po)
188
189       pad_leavemy
190               Cleanup at end of scope during compilation: set the max seq
191               number for lexicals in this scope and warn of any lexicals that
192               never got introduced.
193
194                       void    pad_leavemy()
195
196       pad_push
197               Push a new pad frame onto the padlist, unless there's already a
198               pad at this depth, in which case don't bother creating a new
199               one.  Then give the new pad an @_ in slot zero.
200
201                       void    pad_push(PADLIST *padlist, int depth)
202
203       pad_reset
204               Mark all the current temporaries for reuse
205
206                       void    pad_reset()
207
208       pad_swipe
209               Abandon the tmp in the current pad at offset po and replace
210               with a new one.
211
212                       void    pad_swipe(PADOFFSET po, bool refadjust)
213

Functions in file op.c

215       core_prototype
216               This function assigns the prototype of the named core function
217               to "sv", or to a new mortal SV if "sv" is NULL.  It returns the
218               modified "sv", or NULL if the core function has no prototype.
219               "code" is a code as returned by "keyword()".  It must be
220               negative and unequal to -KEY_CORE.
221
222                       SV *    core_prototype(SV *sv, const char *name,
223                                              const int code,
224                                              int * const opnum)
225

Functions in file pp_ctl.c

227       docatch Check for the cases 0 or 3 of cur_env.je_ret, only used inside
228               an eval context.
229
230               0 is used as continue inside eval,
231
232               3 is used for a die caught by an inner eval - continue inner
233               loop
234
235               See cop.h: je_mustcatch, when set at any runlevel to TRUE,
236               means eval ops must establish a local jmpenv to handle
237               exception traps.
238
239                       OP*     docatch(OP *o)
240

GV Functions

242       gv_try_downgrade
243               If the typeglob "gv" can be expressed more succinctly, by
244               having something other than a real GV in its place in the
245               stash, replace it with the optimised form.  Basic requirements
246               for this are that "gv" is a real typeglob, is sufficiently
247               ordinary, and is only referenced from its package.  This
248               function is meant to be used when a GV has been looked up in
249               part to see what was there, causing upgrading, but based on
250               what was found it turns out that the real GV isn't required
251               after all.
252
253               If "gv" is a completely empty typeglob, it is deleted from the
254               stash.
255
256               If "gv" is a typeglob containing only a sufficiently-ordinary
257               constant sub, the typeglob is replaced with a scalar-reference
258               placeholder that more compactly represents the same thing.
259
260               NOTE: this function is experimental and may change or be
261               removed without notice.
262
263                       void    gv_try_downgrade(GV* gv)
264

Hash Manipulation Functions

266       hv_ename_add
267               Adds a name to a stash's internal list of effective names.  See
268               "hv_ename_delete".
269
270               This is called when a stash is assigned to a new location in
271               the symbol table.
272
273                       void    hv_ename_add(HV *hv, const char *name, U32 len,
274                                            U32 flags)
275
276       hv_ename_delete
277               Removes a name from a stash's internal list of effective names.
278               If this is the name returned by "HvENAME", then another name in
279               the list will take its place ("HvENAME" will use it).
280
281               This is called when a stash is deleted from the symbol table.
282
283                       void    hv_ename_delete(HV *hv, const char *name,
284                                               U32 len, U32 flags)
285
286       refcounted_he_chain_2hv
287               Generates and returns a "HV *" representing the content of a
288               "refcounted_he" chain.  flags is currently unused and must be
289               zero.
290
291                       HV *    refcounted_he_chain_2hv(
292                                   const struct refcounted_he *c, U32 flags
293                               )
294
295       refcounted_he_fetch_pv
296               Like "refcounted_he_fetch_pvn", but takes a nul-terminated
297               string instead of a string/length pair.
298
299                       SV *    refcounted_he_fetch_pv(
300                                   const struct refcounted_he *chain,
301                                   const char *key, U32 hash, U32 flags
302                               )
303
304       refcounted_he_fetch_pvn
305               Search along a "refcounted_he" chain for an entry with the key
306               specified by keypv and keylen.  If flags has the
307               "REFCOUNTED_HE_KEY_UTF8" bit set, the key octets are
308               interpreted as UTF-8, otherwise they are interpreted as
309               Latin-1.  hash is a precomputed hash of the key string, or zero
310               if it has not been precomputed.  Returns a mortal scalar
311               representing the value associated with the key, or
312               &PL_sv_placeholder if there is no value associated with the
313               key.
314
315                       SV *    refcounted_he_fetch_pvn(
316                                   const struct refcounted_he *chain,
317                                   const char *keypv, STRLEN keylen, U32 hash,
318                                   U32 flags
319                               )
320
321       refcounted_he_fetch_pvs
322               Like "refcounted_he_fetch_pvn", but takes a literal string
323               instead of a string/length pair, and no precomputed hash.
324
325                       SV *    refcounted_he_fetch_pvs(
326                                   const struct refcounted_he *chain,
327                                   const char *key, U32 flags
328                               )
329
330       refcounted_he_fetch_sv
331               Like "refcounted_he_fetch_pvn", but takes a Perl scalar instead
332               of a string/length pair.
333
334                       SV *    refcounted_he_fetch_sv(
335                                   const struct refcounted_he *chain, SV *key,
336                                   U32 hash, U32 flags
337                               )
338
339       refcounted_he_free
340               Decrements the reference count of a "refcounted_he" by one.  If
341               the reference count reaches zero the structure's memory is
342               freed, which (recursively) causes a reduction of its parent
343               "refcounted_he"'s reference count.  It is safe to pass a null
344               pointer to this function: no action occurs in this case.
345
346                       void    refcounted_he_free(struct refcounted_he *he)
347
348       refcounted_he_inc
349               Increment the reference count of a "refcounted_he".  The
350               pointer to the "refcounted_he" is also returned.  It is safe to
351               pass a null pointer to this function: no action occurs and a
352               null pointer is returned.
353
354                       struct refcounted_he * refcounted_he_inc(
355                                                  struct refcounted_he *he
356                                              )
357
358       refcounted_he_new_pv
359               Like "refcounted_he_new_pvn", but takes a nul-terminated string
360               instead of a string/length pair.
361
362                       struct refcounted_he * refcounted_he_new_pv(
363                                                  struct refcounted_he *parent,
364                                                  const char *key, U32 hash,
365                                                  SV *value, U32 flags
366                                              )
367
368       refcounted_he_new_pvn
369               Creates a new "refcounted_he".  This consists of a single
370               key/value pair and a reference to an existing "refcounted_he"
371               chain (which may be empty), and thus forms a longer chain.
372               When using the longer chain, the new key/value pair takes
373               precedence over any entry for the same key further along the
374               chain.
375
376               The new key is specified by keypv and keylen.  If flags has the
377               "REFCOUNTED_HE_KEY_UTF8" bit set, the key octets are
378               interpreted as UTF-8, otherwise they are interpreted as
379               Latin-1.  hash is a precomputed hash of the key string, or zero
380               if it has not been precomputed.
381
382               value is the scalar value to store for this key.  value is
383               copied by this function, which thus does not take ownership of
384               any reference to it, and later changes to the scalar will not
385               be reflected in the value visible in the "refcounted_he".
386               Complex types of scalar will not be stored with referential
387               integrity, but will be coerced to strings.  value may be either
388               null or &PL_sv_placeholder to indicate that no value is to be
389               associated with the key; this, as with any non-null value,
390               takes precedence over the existence of a value for the key
391               further along the chain.
392
393               parent points to the rest of the "refcounted_he" chain to be
394               attached to the new "refcounted_he".  This function takes
395               ownership of one reference to parent, and returns one reference
396               to the new "refcounted_he".
397
398                       struct refcounted_he * refcounted_he_new_pvn(
399                                                  struct refcounted_he *parent,
400                                                  const char *keypv,
401                                                  STRLEN keylen, U32 hash,
402                                                  SV *value, U32 flags
403                                              )
404
405       refcounted_he_new_pvs
406               Like "refcounted_he_new_pvn", but takes a literal string
407               instead of a string/length pair, and no precomputed hash.
408
409                       struct refcounted_he * refcounted_he_new_pvs(
410                                                  struct refcounted_he *parent,
411                                                  const char *key, SV *value,
412                                                  U32 flags
413                                              )
414
415       refcounted_he_new_sv
416               Like "refcounted_he_new_pvn", but takes a Perl scalar instead
417               of a string/length pair.
418
419                       struct refcounted_he * refcounted_he_new_sv(
420                                                  struct refcounted_he *parent,
421                                                  SV *key, U32 hash, SV *value,
422                                                  U32 flags
423                                              )
424

IO Functions

426       start_glob
427               Function called by "do_readline" to spawn a glob (or do the
428               glob inside perl on VMS). This code used to be inline, but now
429               perl uses "File::Glob" this glob starter is only used by
430               miniperl during the build process.  Moving it away shrinks
431               pp_hot.c; shrinking pp_hot.c helps speed perl up.
432
433               NOTE: this function is experimental and may change or be
434               removed without notice.
435
436                       PerlIO* start_glob(SV *tmpglob, IO *io)
437

Magical Functions

439       magic_clearhint
440               Triggered by a delete from %^H, records the key to
441               "PL_compiling.cop_hints_hash".
442
443                       int     magic_clearhint(SV* sv, MAGIC* mg)
444
445       magic_clearhints
446               Triggered by clearing %^H, resets
447               "PL_compiling.cop_hints_hash".
448
449                       int     magic_clearhints(SV* sv, MAGIC* mg)
450
451       magic_methcall
452               Invoke a magic method (like FETCH).
453
454               "sv" and "mg" are the tied thingy and the tie magic.
455
456               "meth" is the name of the method to call.
457
458               "argc" is the number of args (in addition to $self) to pass to
459               the method.
460
461               The "flags" can be:
462
463                   G_DISCARD     invoke method with G_DISCARD flag and don't
464                                 return a value
465                   G_UNDEF_FILL  fill the stack with argc pointers to
466                                 PL_sv_undef
467
468               The arguments themselves are any values following the "flags"
469               argument.
470
471               Returns the SV (if any) returned by the method, or NULL on
472               failure.
473
474                       SV*     magic_methcall(SV *sv, const MAGIC *mg,
475                                              const char *meth, U32 flags,
476                                              U32 argc, ...)
477
478       magic_sethint
479               Triggered by a store to %^H, records the key/value pair to
480               "PL_compiling.cop_hints_hash".  It is assumed that hints aren't
481               storing anything that would need a deep copy.  Maybe we should
482               warn if we find a reference.
483
484                       int     magic_sethint(SV* sv, MAGIC* mg)
485
486       mg_localize
487               Copy some of the magic from an existing SV to new localized
488               version of that SV. Container magic (eg %ENV, $1, tie) gets
489               copied, value magic doesn't (eg taint, pos).
490
491               If setmagic is false then no set magic will be called on the
492               new (empty) SV.  This typically means that assignment will soon
493               follow (e.g. 'local $x = $y'), and that will handle the magic.
494
495                       void    mg_localize(SV* sv, SV* nsv, bool setmagic)
496

MRO Functions

498       mro_get_linear_isa_dfs
499               Returns the Depth-First Search linearization of @ISA the given
500               stash.  The return value is a read-only AV*.  "level" should be
501               0 (it is used internally in this function's recursion).
502
503               You are responsible for "SvREFCNT_inc()" on the return value if
504               you plan to store it anywhere semi-permanently (otherwise it
505               might be deleted out from under you the next time the cache is
506               invalidated).
507
508                       AV*     mro_get_linear_isa_dfs(HV* stash, U32 level)
509
510       mro_isa_changed_in
511               Takes the necessary steps (cache invalidations, mostly) when
512               the @ISA of the given package has changed.  Invoked by the
513               "setisa" magic, should not need to invoke directly.
514
515                       void    mro_isa_changed_in(HV* stash)
516
517       mro_package_moved
518               Call this function to signal to a stash that it has been
519               assigned to another spot in the stash hierarchy.  "stash" is
520               the stash that has been assigned. "oldstash" is the stash it
521               replaces, if any.  "gv" is the glob that is actually being
522               assigned to.
523
524               This can also be called with a null first argument to indicate
525               that "oldstash" has been deleted.
526
527               This function invalidates isa caches on the old stash, on all
528               subpackages nested inside it, and on the subclasses of all
529               those, including non-existent packages that have corresponding
530               entries in "stash".
531
532               It also sets the effective names ("HvENAME") on all the stashes
533               as appropriate.
534
535               If the "gv" is present and is not in the symbol table, then
536               this function simply returns.  This checked will be skipped if
537               "flags & 1".
538
539                       void    mro_package_moved(HV * const stash,
540                                                 HV * const oldstash,
541                                                 const GV * const gv,
542                                                 U32 flags)
543

Optree Manipulation Functions

545       finalize_optree
546               This function finalizes the optree. Should be called directly
547               after the complete optree is built. It does some additional
548               checking which can't be done in the normal ck_xxx functions and
549               makes the tree thread-safe.
550
551                       void    finalize_optree(OP* o)
552

Pad Data Structures

554       CX_CURPAD_SAVE
555               Save the current pad in the given context block structure.
556
557                       void    CX_CURPAD_SAVE(struct context)
558
559       CX_CURPAD_SV
560               Access the SV at offset po in the saved current pad in the
561               given context block structure (can be used as an lvalue).
562
563                       SV *    CX_CURPAD_SV(struct context, PADOFFSET po)
564
565       PAD_BASE_SV
566               Get the value from slot "po" in the base (DEPTH=1) pad of a
567               padlist
568
569                       SV *    PAD_BASE_SV(PADLIST padlist, PADOFFSET po)
570
571       PAD_CLONE_VARS
572               Clone the state variables associated with running and compiling
573               pads.
574
575                       void    PAD_CLONE_VARS(PerlInterpreter *proto_perl,
576                                              CLONE_PARAMS* param)
577
578       PAD_COMPNAME_FLAGS
579               Return the flags for the current compiling pad name at offset
580               "po". Assumes a valid slot entry.
581
582                       U32     PAD_COMPNAME_FLAGS(PADOFFSET po)
583
584       PAD_COMPNAME_GEN
585               The generation number of the name at offset "po" in the current
586               compiling pad (lvalue). Note that "SvUVX" is hijacked for this
587               purpose.
588
589                       STRLEN  PAD_COMPNAME_GEN(PADOFFSET po)
590
591       PAD_COMPNAME_GEN_set
592               Sets the generation number of the name at offset "po" in the
593               current ling pad (lvalue) to "gen".  Note that "SvUV_set" is
594               hijacked for this purpose.
595
596                       STRLEN  PAD_COMPNAME_GEN_set(PADOFFSET po, int gen)
597
598       PAD_COMPNAME_OURSTASH
599               Return the stash associated with an "our" variable.  Assumes
600               the slot entry is a valid "our" lexical.
601
602                       HV *    PAD_COMPNAME_OURSTASH(PADOFFSET po)
603
604       PAD_COMPNAME_PV
605               Return the name of the current compiling pad name at offset
606               "po". Assumes a valid slot entry.
607
608                       char *  PAD_COMPNAME_PV(PADOFFSET po)
609
610       PAD_COMPNAME_TYPE
611               Return the type (stash) of the current compiling pad name at
612               offset "po". Must be a valid name. Returns null if not typed.
613
614                       HV *    PAD_COMPNAME_TYPE(PADOFFSET po)
615
616       pad_peg When PERL_MAD is enabled, this is a small no-op function that
617               gets called at the start of each pad-related function.  It can
618               be breakpointed to track all pad operations.  The parameter is
619               a string indicating the type of pad operation being performed.
620
621               NOTE: this function is experimental and may change or be
622               removed without notice.
623
624                       void    pad_peg(const char *s)
625
626       PAD_RESTORE_LOCAL
627               Restore the old pad saved into the local variable opad by
628               PAD_SAVE_LOCAL()
629
630                       void    PAD_RESTORE_LOCAL(PAD *opad)
631
632       PAD_SAVE_LOCAL
633               Save the current pad to the local variable opad, then make the
634               current pad equal to npad
635
636                       void    PAD_SAVE_LOCAL(PAD *opad, PAD *npad)
637
638       PAD_SAVE_SETNULLPAD
639               Save the current pad then set it to null.
640
641                       void    PAD_SAVE_SETNULLPAD()
642
643       PAD_SETSV
644               Set the slot at offset "po" in the current pad to "sv"
645
646                       SV *    PAD_SETSV(PADOFFSET po, SV* sv)
647
648       PAD_SET_CUR
649               Set the current pad to be pad "n" in the padlist, saving the
650               previous current pad. NB currently this macro expands to a
651               string too long for some compilers, so it's best to replace it
652               with
653
654                   SAVECOMPPAD();
655                   PAD_SET_CUR_NOSAVE(padlist,n);
656
657
658                       void    PAD_SET_CUR(PADLIST padlist, I32 n)
659
660       PAD_SET_CUR_NOSAVE
661               like PAD_SET_CUR, but without the save
662
663                       void    PAD_SET_CUR_NOSAVE(PADLIST padlist, I32 n)
664
665       PAD_SV  Get the value at offset "po" in the current pad
666
667                       void    PAD_SV(PADOFFSET po)
668
669       PAD_SVl Lightweight and lvalue version of "PAD_SV".  Get or set the
670               value at offset "po" in the current pad.  Unlike "PAD_SV", does
671               not print diagnostics with -DX.  For internal use only.
672
673                       SV *    PAD_SVl(PADOFFSET po)
674
675       SAVECLEARSV
676               Clear the pointed to pad value on scope exit. (i.e. the runtime
677               action of 'my')
678
679                       void    SAVECLEARSV(SV **svp)
680
681       SAVECOMPPAD
682               save PL_comppad and PL_curpad
683
684                       void    SAVECOMPPAD()
685
686       SAVEPADSV
687               Save a pad slot (used to restore after an iteration)
688
689               XXX DAPM it would make more sense to make the arg a PADOFFSET
690                    void SAVEPADSV(PADOFFSET po)
691

Per-Interpreter Variables

693       PL_DBsingle
694               When Perl is run in debugging mode, with the -d switch, this SV
695               is a boolean which indicates whether subs are being single-
696               stepped.  Single-stepping is automatically turned on after
697               every step.  This is the C variable which corresponds to Perl's
698               $DB::single variable.  See "PL_DBsub".
699
700                       SV *    PL_DBsingle
701
702       PL_DBsub
703               When Perl is run in debugging mode, with the -d switch, this GV
704               contains the SV which holds the name of the sub being debugged.
705               This is the C variable which corresponds to Perl's $DB::sub
706               variable.  See "PL_DBsingle".
707
708                       GV *    PL_DBsub
709
710       PL_DBtrace
711               Trace variable used when Perl is run in debugging mode, with
712               the -d switch.  This is the C variable which corresponds to
713               Perl's $DB::trace variable.  See "PL_DBsingle".
714
715                       SV *    PL_DBtrace
716
717       PL_dowarn
718               The C variable which corresponds to Perl's $^W warning
719               variable.
720
721                       bool    PL_dowarn
722
723       PL_last_in_gv
724               The GV which was last used for a filehandle input operation.
725               ("<FH>")
726
727                       GV*     PL_last_in_gv
728
729       PL_ofsgv
730               The glob containing the output field separator - "*," in Perl
731               space.
732
733                       GV*     PL_ofsgv
734
735       PL_rs   The input record separator - $/ in Perl space.
736
737                       SV*     PL_rs
738

Stack Manipulation Macros

740       djSP    Declare Just "SP". This is actually identical to "dSP", and
741               declares a local copy of perl's stack pointer, available via
742               the "SP" macro.  See "SP".  (Available for backward source code
743               compatibility with the old (Perl 5.005) thread model.)
744
745                               djSP;
746
747       LVRET   True if this op will be the return value of an lvalue
748               subroutine
749

SV Manipulation Functions

751       sv_add_arena
752               Given a chunk of memory, link it to the head of the list of
753               arenas, and split it into a list of free SVs.
754
755                       void    sv_add_arena(char *const ptr, const U32 size,
756                                            const U32 flags)
757
758       sv_clean_all
759               Decrement the refcnt of each remaining SV, possibly triggering
760               a cleanup.  This function may have to be called multiple times
761               to free SVs which are in complex self-referential hierarchies.
762
763                       I32     sv_clean_all()
764
765       sv_clean_objs
766               Attempt to destroy all objects not yet freed.
767
768                       void    sv_clean_objs()
769
770       sv_free_arenas
771               Deallocate the memory used by all arenas.  Note that all the
772               individual SV heads and bodies within the arenas must already
773               have been freed.
774
775                       void    sv_free_arenas()
776

SV-Body Allocation

778       sv_2num Return an SV with the numeric value of the source SV, doing any
779               necessary reference or overload conversion.  You must use the
780               "SvNUM(sv)" macro to access this function.
781
782               NOTE: this function is experimental and may change or be
783               removed without notice.
784
785                       SV*     sv_2num(SV *const sv)
786
787       sv_ref  Returns a SV describing what the SV passed in is a reference
788               to.
789
790                       SV*     sv_ref(SV *dst, const SV *const sv,
791                                      const int ob)
792

Unicode Support

794       find_uninit_var
795               Find the name of the undefined variable (if any) that caused
796               the operator to issue a "Use of uninitialized value" warning.
797               If match is true, only return a name if its value matches
798               uninit_sv.  So roughly speaking, if a unary operator (such as
799               OP_COS) generates a warning, then following the direct child of
800               the op may yield an OP_PADSV or OP_GV that gives the name of
801               the undefined variable.  On the other hand, with OP_ADD there
802               are two branches to follow, so we only print the variable name
803               if we get an exact match.
804
805               The name is returned as a mortal SV.
806
807               Assumes that PL_op is the op that originally triggered the
808               error, and that PL_comppad/PL_curpad points to the currently
809               executing pad.
810
811               NOTE: this function is experimental and may change or be
812               removed without notice.
813
814                       SV*     find_uninit_var(const OP *const obase,
815                                               const SV *const uninit_sv,
816                                               bool top)
817
818       report_uninit
819               Print appropriate "Use of uninitialized variable" warning.
820
821                       void    report_uninit(const SV *uninit_sv)
822

Undocumented functions

824       The following functions are currently undocumented.  If you use one of
825       them, you may wish to consider creating and submitting documentation
826       for it.
827
828       _add_range_to_invlist
829       _core_swash_init
830       _invlist_array_init
831       _invlist_contents
832       _invlist_intersection
833       _invlist_intersection_maybe_complement_2nd
834       _invlist_invert
835       _invlist_invert_prop
836       _invlist_populate_swatch
837       _invlist_subtract
838       _invlist_union
839       _invlist_union_maybe_complement_2nd
840       _is_utf8__perl_idstart
841       _new_invlist
842       _swash_inversion_hash
843       _swash_to_invlist
844       _to_fold_latin1
845       _to_upper_title_latin1
846       aassign_common_vars
847       add_cp_to_invlist
848       addmad
849       allocmy
850       amagic_is_enabled
851       append_madprops
852       apply
853       av_reify
854       bind_match
855       block_end
856       block_start
857       boot_core_PerlIO
858       boot_core_UNIVERSAL
859       boot_core_mro
860       cando
861       check_utf8_print
862       ck_entersub_args_core
863       convert
864       coresub_op
865       create_eval_scope
866       cv_ckproto_len_flags
867       cvgv_set
868       cvstash_set
869       deb_stack_all
870       delete_eval_scope
871       die_unwind
872       do_aexec
873       do_aexec5
874       do_eof
875       do_exec
876       do_exec3
877       do_execfree
878       do_ipcctl
879       do_ipcget
880       do_msgrcv
881       do_msgsnd
882       do_ncmp
883       do_op_xmldump
884       do_pmop_xmldump
885       do_print
886       do_readline
887       do_seek
888       do_semop
889       do_shmio
890       do_sysseek
891       do_tell
892       do_trans
893       do_vecget
894       do_vecset
895       do_vop
896       dofile
897       dump_all_perl
898       dump_packsubs_perl
899       dump_sub_perl
900       dump_sv_child
901       emulate_cop_io
902       feature_is_enabled
903       find_rundefsv2
904       find_script
905       free_tied_hv_pool
906       get_db_sub
907       get_debug_opts
908       get_hash_seed
909       get_invlist_iter_addr
910       get_invlist_len_addr
911       get_invlist_version_id_addr
912       get_invlist_zero_addr
913       get_no_modify
914       get_opargs
915       get_re_arg
916       getenv_len
917       hfree_next_entry
918       hv_backreferences_p
919       hv_kill_backrefs
920       hv_undef_flags
921       init_argv_symbols
922       init_dbargs
923       init_debugger
924       invert
925       invlist_array
926       invlist_clone
927       invlist_iterinit
928       invlist_len
929       invlist_max
930       invlist_set_len
931       invlist_trim
932       io_close
933       is_utf8_X_L
934       is_utf8_X_LV
935       is_utf8_X_LVT
936       is_utf8_X_LV_LVT_V
937       is_utf8_X_T
938       is_utf8_X_V
939       is_utf8_X_begin
940       is_utf8_X_extend
941       is_utf8_X_non_hangul
942       is_utf8_X_prepend
943       jmaybe
944       keyword
945       keyword_plugin_standard
946       list
947       localize
948       mad_free
949       madlex
950       madparse
951       magic_clear_all_env
952       magic_clearenv
953       magic_clearisa
954       magic_clearpack
955       magic_clearsig
956       magic_existspack
957       magic_freearylen_p
958       magic_freeovrld
959       magic_get
960       magic_getarylen
961       magic_getdefelem
962       magic_getnkeys
963       magic_getpack
964       magic_getpos
965       magic_getsig
966       magic_getsubstr
967       magic_gettaint
968       magic_getuvar
969       magic_getvec
970       magic_killbackrefs
971       magic_len
972       magic_nextpack
973       magic_regdata_cnt
974       magic_regdatum_get
975       magic_regdatum_set
976       magic_scalarpack
977       magic_set
978       magic_set_all_env
979       magic_setamagic
980       magic_setarylen
981       magic_setcollxfrm
982       magic_setdbline
983       magic_setdefelem
984       magic_setenv
985       magic_setisa
986       magic_setmglob
987       magic_setnkeys
988       magic_setpack
989       magic_setpos
990       magic_setregexp
991       magic_setsig
992       magic_setsubstr
993       magic_settaint
994       magic_setutf8
995       magic_setuvar
996       magic_setvec
997       magic_setvstring
998       magic_sizepack
999       magic_wipepack
1000       malloc_good_size
1001       malloced_size
1002       mem_collxfrm
1003       mode_from_discipline
1004       more_bodies
1005       mro_meta_dup
1006       mro_meta_init
1007       munge_qwlist_to_paren_list
1008       my_attrs
1009       my_betoh16
1010       my_betoh32
1011       my_betoh64
1012       my_betohi
1013       my_betohl
1014       my_betohs
1015       my_clearenv
1016       my_htobe16
1017       my_htobe32
1018       my_htobe64
1019       my_htobei
1020       my_htobel
1021       my_htobes
1022       my_htole16
1023       my_htole32
1024       my_htole64
1025       my_htolei
1026       my_htolel
1027       my_htoles
1028       my_letoh16
1029       my_letoh32
1030       my_letoh64
1031       my_letohi
1032       my_letohl
1033       my_letohs
1034       my_lstat_flags
1035       my_stat_flags
1036       my_swabn
1037       my_unexec
1038       newATTRSUB_flags
1039       newGP
1040       newMADPROP
1041       newMADsv
1042       newTOKEN
1043       newXS_len_flags
1044       new_warnings_bitfield
1045       nextargv
1046       oopsAV
1047       oopsHV
1048       op_clear
1049       op_const_sv
1050       op_getmad
1051       op_getmad_weak
1052       op_integerize
1053       op_lvalue_flags
1054       op_refcnt_dec
1055       op_refcnt_inc
1056       op_std_init
1057       op_xmldump
1058       package
1059       package_version
1060       parse_unicode_opts
1061       parser_free
1062       peep
1063       pending_Slabs_to_ro
1064       pmop_xmldump
1065       pmruntime
1066       populate_isa
1067       prepend_madprops
1068       qerror
1069       reg_named_buff
1070       reg_named_buff_iter
1071       reg_numbered_buff_fetch
1072       reg_numbered_buff_length
1073       reg_numbered_buff_store
1074       reg_qr_package
1075       reg_temp_copy
1076       regcurly
1077       regprop
1078       report_evil_fh
1079       report_redefined_cv
1080       report_wrongway_fh
1081       rpeep
1082       rsignal_restore
1083       rsignal_save
1084       rxres_save
1085       same_dirent
1086       sawparens
1087       scalar
1088       scalarvoid
1089       set_regclass_bit
1090       sighandler
1091       softref2xv
1092       sub_crush_depth
1093       sv_add_backref
1094       sv_catxmlpv
1095       sv_catxmlpvn
1096       sv_catxmlsv
1097       sv_compile_2op_is_broken
1098       sv_del_backref
1099       sv_free2
1100       sv_kill_backrefs
1101       sv_sethek
1102       sv_setsv_cow
1103       sv_unglob
1104       sv_xmlpeek
1105       tied_method
1106       token_free
1107       token_getmad
1108       translate_substr_offsets
1109       try_amagic_bin
1110       try_amagic_un
1111       unshare_hek
1112       utilize
1113       varname
1114       vivify_defelem
1115       vivify_ref
1116       wait4pid
1117       was_lvalue_sub
1118       watch
1119       write_to_stderr
1120       xmldump_all
1121       xmldump_all_perl
1122       xmldump_eval
1123       xmldump_form
1124       xmldump_indent
1125       xmldump_packsubs
1126       xmldump_packsubs_perl
1127       xmldump_sub
1128       xmldump_sub_perl
1129       xmldump_vindent
1130       xs_apiversion_bootcheck
1131       xs_version_bootcheck
1132       yyerror
1133       yyerror_pv
1134       yyerror_pvn
1135       yylex
1136       yyparse
1137       yyunlex
1138

AUTHORS

1140       The autodocumentation system was originally added to the Perl core by
1141       Benjamin Stuhl. Documentation is by whoever was kind enough to document
1142       their functions.
1143

SEE ALSO

1145       perlguts, perlapi
1146
1147
1148
1149perl v5.16.3                      2019-01-21                     PERLINTERN(1)
Impressum