. It does not handle magic, hence the C private indication in its name.
=over 3
SSize_t AvFILLp(AV* av)
=back
=back
=for hackers
Found in file av.h
=head1 Callback Functions
There are only public API items currently in Callback Functions
=head1 Casting
There are only public API items currently in Casting
=head1 Character case changing
There are only public API items currently in Character case changing
=head1 Character classification
There are only public API items currently in Character classification
=head1 Compiler and Preprocessor information
There are only public API items currently in Compiler and Preprocessor information
=head1 Compiler directives
There are only public API items currently in Compiler directives
=head1 Compile-time scope hooks
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
Return an entry from the BHK structure. C is a preprocessor token
indicating which entry to return. If the appropriate flag is not set
this will return C. The type of the return value depends on which
entry you ask for.
=over 3
void * BhkENTRY(BHK *hk, which)
=back
=back
=for hackers
Found in file op.h
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
Return the BHK's flags.
=over 3
U32 BhkFLAGS(BHK *hk)
=back
=back
=for hackers
Found in file op.h
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
Call all the registered block hooks for type C. C is a
preprocessing token; the type of C depends on C.
=over 3
void CALL_BLOCK_HOOKS(which, arg)
=back
=back
=for hackers
Found in file op.h
=head1 Concurrency
There are only public API items currently in Concurrency
=head1 COP Hint Hashes
There are only public API items currently in COP Hint Hashes
=head1 Custom Operators
=over 4
=item C
X
This function assigns the prototype of the named core function to C, or
to a new mortal SV if C is C. It returns the modified C, or
C if the core function has no prototype. C is a code as returned
by C. It must not be equal to 0.
=over 3
SV * core_prototype(SV *sv, const char *name, const int code,
int * const opnum)
=back
=back
=for hackers
Found in file op.c
=head1 CV Handling
=over 4
=item C
X
Each CV has a pointer, C, to its lexically enclosing
CV (if any). Because pointers to anonymous sub prototypes are
stored in C<&> pad slots, it is a possible to get a circular reference,
with the parent pointing to the child and vice-versa. To avoid the
ensuing memory leak, we do not increment the reference count of the CV
pointed to by C in the I that the parent
has a C<&> pad slot pointing back to us. In this case, we set the
C flag in the child. This allows us to determine under what
circumstances we should decrement the refcount of the parent when freeing
the child.
There is a further complication with non-closure anonymous subs (i.e. those
that do not refer to any lexicals outside that sub). In this case, the
anonymous prototype is shared rather than being cloned. This has the
consequence that the parent may be freed while there are still active
children, I,
BEGIN { $a = sub { eval '$x' } }
In this case, the BEGIN is freed immediately after execution since there
are no active references to it: the anon sub prototype has
C set since it's not a closure, and $a points to the same
CV, so it doesn't contribute to BEGIN's refcount either. When $a is
executed, the C causes the chain of Cs to be followed,
and the freed BEGIN is accessed.
To avoid this, whenever a CV and its associated pad is freed, any
C<&> entries in the pad are explicitly removed from the pad, and if the
refcount of the pointed-to anon sub is still positive, then that
child's C is set to point to its grandparent. This will only
occur in the single specific case of a non-closure anon prototype
having one or more active references (such as C<$a> above).
One other thing to consider is that a CV may be merely undefined
rather than freed, eg C. In this case, its refcount may
not have reached zero, but we still delete its pad and its C etc.
Since various children may still have their C pointing at this
undefined CV, we keep its own C for the time being, so that
the chain of lexical scopes is unbroken. For example, the following
should print 123:
my $x = 123;
sub tmp { sub { eval '$x' } }
my $a = tmp();
undef &tmp;
print $a->();
=over 3
bool CvWEAKOUTSIDE(CV *cv)
=back
=back
=for hackers
Found in file cv.h
=over 4
=item C
X
Check for the cases 0 or 3 of cur_env.je_ret, only used inside an eval context.
0 is used as continue inside eval,
3 is used for a die caught by an inner eval - continue inner loop
See F: je_mustcatch, when set at any runlevel to TRUE, means eval ops must
establish a local jmpenv to handle exception traps.
=over 3
OP* docatch(Perl_ppaddr_t firstpp)
=back
=back
=for hackers
Found in file pp_ctl.c
=head1 Debugging
=over 4
=item C
X
Deallocates a backtrace received from get_c_backtrace.
=over 3
void free_c_backtrace(Perl_c_backtrace* bt)
=back
=back
=for hackers
Found in file util.c
=over 4
=item C
X
Collects the backtrace (aka "stacktrace") into a single linear
malloced buffer, which the caller B C.
Scans the frames back by S>, then drops the C innermost,
returning at most C frames.
=over 3
Perl_c_backtrace* get_c_backtrace(int max_depth, int skip)
=back
=back
=for hackers
Found in file util.c
=over 4
=item C
X
When Perl is run in debugging mode, with the B<-d> switch, this SV is a
boolean which indicates whether subs are being single-stepped.
Single-stepping is automatically turned on after every step. This is the C
variable which corresponds to Perl's $DB::single variable. See
C>.
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
SV * PL_DBsingle
=back
=back
=for hackers
Found in file intrpvar.h
=over 4
=item C
X
When Perl is run in debugging mode, with the B<-d> switch, this GV contains
the SV which holds the name of the sub being debugged. This is the C
variable which corresponds to Perl's $DB::sub variable. See
C>.
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
GV * PL_DBsub
=back
=back
=for hackers
Found in file intrpvar.h
=over 4
=item C
X
Trace variable used when Perl is run in debugging mode, with the B<-d>
switch. This is the C variable which corresponds to Perl's $DB::trace
variable. See C>.
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
SV * PL_DBtrace
=back
=back
=for hackers
Found in file intrpvar.h
=head1 Display functions
There are only public API items currently in Display functions
=head1 Embedding and Interpreter Cloning
=over 4
=item C
X
dump the contents of a CV
=over 3
void cv_dump(const CV *cv, const char *title)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
When a CV has a reference count on its slab (C), it is responsible
for making sure it is freed. (Hence, no two CVs should ever have a
reference count on the same slab.) The CV only needs to reference the slab
during compilation. Once it is compiled and C attached, it has
finished its job, so it can forget the slab.
=over 3
void cv_forget_slab(CV *cv)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Dump the contents of a padlist
=over 3
void do_dump_pad(I32 level, PerlIO *file, PADLIST *padlist,
int full)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Allocates a place in the currently-compiling
pad (via L) and
then stores a name for that entry. C is adopted and
becomes the name entry; it must already contain the name
string. C and C and the C
flag get added to C. None of the other
processing of L
is done. Returns the offset of the allocated pad slot.
=over 3
PADOFFSET pad_alloc_name(PADNAME *name, U32 flags, HV *typestash,
HV *ourstash)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Update the pad compilation state variables on entry to a new block.
=over 3
void pad_block_start(int full)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Check for duplicate declarations: report any of:
* a 'my' in the current scope with the same name;
* an 'our' (anywhere in the pad) with the same name and the
same stash as 'ourstash'
C indicates that the name to check is an C<"our"> declaration.
=over 3
void pad_check_dup(PADNAME *name, U32 flags, const HV *ourstash)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Find a named lexical anywhere in a chain of nested pads. Add fake entries
in the inner pads if it's found in an outer one.
Returns the offset in the bottom pad of the lex or the fake lex.
C is the CV in which to start the search, and seq is the current C
to match against. If C is true, print appropriate warnings. The C*
vars return values, and so are pointers to where the returned values
should be stored. C, if non-null, requests that the innermost
instance of the lexical is captured; C is set to the innermost
matched pad name or fake pad name; C returns the flags normally
associated with the C field of a fake pad name.
Note that C is recursive; it recurses up the chain of CVs,
then comes back down, adding fake entries
as it goes. It has to be this way
because fake names in anon prototypes have to store in C the
index into the parent pad.
=over 3
PADOFFSET pad_findlex(const char *namepv, STRLEN namelen,
U32 flags, const CV* cv, U32 seq, int warn,
SV** out_capture, PADNAME** out_name,
int *out_flags)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
For any anon CVs in the pad, change C of that CV from
C to C if necessary. Needed when a newly-compiled CV has to be
moved to a pre-existing CV struct.
=over 3
void pad_fixup_inner_anons(PADLIST *padlist, CV *old_cv,
CV *new_cv)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Free the SV at offset po in the current pad.
=over 3
void pad_free(PADOFFSET po)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Cleanup at end of scope during compilation: set the max seq number for
lexicals in this scope and warn of any lexicals that never got introduced.
=over 3
OP * pad_leavemy()
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Duplicates a pad.
=over 3
PADLIST * padlist_dup(PADLIST *srcpad, CLONE_PARAMS *param)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Duplicates a pad name.
=over 3
PADNAME * padname_dup(PADNAME *src, CLONE_PARAMS *param)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Duplicates a pad name list.
=over 3
PADNAMELIST * padnamelist_dup(PADNAMELIST *srcpad,
CLONE_PARAMS *param)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Push a new pad frame onto the padlist, unless there's already a pad at
this depth, in which case don't bother creating a new one. Then give
the new pad an C<@_> in slot zero.
=over 3
void pad_push(PADLIST *padlist, int depth)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Mark all the current temporaries for reuse
=over 3
void pad_reset()
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Set the value at offset C in the current (compiling or executing) pad.
Use the macro C rather than calling this function directly.
=over 3
void pad_setsv(PADOFFSET po, SV* sv)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Get the value at offset C in the current (compiling or executing) pad.
Use macro C instead of calling this function directly.
=over 3
SV* pad_sv(PADOFFSET po)
=back
=back
=for hackers
Found in file pad.c
=over 4
=item C
X
Abandon the tmp in the current pad at offset C and replace with a
new one.
=over 3
void pad_swipe(PADOFFSET po, bool refadjust)
=back
=back
=for hackers
Found in file pad.c
=head1 Errno
=over 4
=item C
X
Declare variables needed to save C and any operating system
specific error number.
=over 3
void dSAVEDERRNO
=back
=back
=for hackers
Found in file perl.h
=over 4
=item C
X
Declare variables needed to save C and any operating system
specific error number, and save them for optional later restoration
by C.
=over 3
void dSAVE_ERRNO
=back
=back
=for hackers
Found in file perl.h
=over 4
=item C
X
Restore C and any operating system specific error number that
was saved by C or C.
=over 3
void RESTORE_ERRNO
=back
=back
=for hackers
Found in file perl.h
=over 4
=item C
X
Save C and any operating system specific error number for
optional later restoration by C. Requires
C or C in scope.
=over 3
void SAVE_ERRNO
=back
=back
=for hackers
Found in file perl.h
=over 4
=item C
X
Set C, and on VMS set C.
=over 3
void SETERRNO(int errcode, int vmserrcode)
=back
=back
=for hackers
Found in file perl.h
=head1 Exception Handling (simple) Macros
There are only public API items currently in Exception Handling (simple) Macros
=head1 Filesystem configuration values
There are only public API items currently in Filesystem configuration values
=head1 Floating point configuration values
There are only public API items currently in Floating point configuration values
=head1 Formats
There are only public API items currently in Formats
=head1 General Configuration
There are only public API items currently in General Configuration
=head1 Global Variables
There are only public API items currently in Global Variables
=head1 GV Handling
=over 4
=item C
X
Returns a pointer to the stash for a specified package, possibly
cached. Implements both L> and
L>.
Requires one of either C or C to be non-null.
If the flag C is set, return the stash only if found in the
cache; see L> for details on the other C.
Note it is strongly preferred for C to be non-null, for performance
reasons.
=over 3
HV* gv_stashsvpvn_cached(SV *namesv, const char* name,
U32 namelen, I32 flags)
=back
=back
=for hackers
Found in file gv.c
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
If the typeglob C can be expressed more succinctly, by having
something other than a real GV in its place in the stash, replace it
with the optimised form. Basic requirements for this are that C
is a real typeglob, is sufficiently ordinary, and is only referenced
from its package. This function is meant to be used when a GV has been
looked up in part to see what was there, causing upgrading, but based
on what was found it turns out that the real GV isn't required after all.
If C is a completely empty typeglob, it is deleted from the stash.
If C is a typeglob containing only a sufficiently-ordinary constant
sub, the typeglob is replaced with a scalar-reference placeholder that
more compactly represents the same thing.
=over 3
void gv_try_downgrade(GV* gv)
=back
=back
=for hackers
Found in file gv.c
=head1 Hook manipulation
There are only public API items currently in Hook manipulation
=head1 HV Handling
=over 4
=item C
X
Adds a name to a stash's internal list of effective names. See
C>.
This is called when a stash is assigned to a new location in the symbol
table.
=over 3
void hv_ename_add(HV *hv, const char *name, U32 len, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Removes a name from a stash's internal list of effective names. If this is
the name returned by C, then another name in the list will take
its place (C will use it).
This is called when a stash is deleted from the symbol table.
=over 3
void hv_ename_delete(HV *hv, const char *name, U32 len,
U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Generates and returns a C representing the content of a
C chain.
C is currently unused and must be zero.
=over 3
HV * refcounted_he_chain_2hv(const struct refcounted_he *c,
U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Like L, but takes a nul-terminated string
instead of a string/length pair.
=over 3
SV * refcounted_he_fetch_pv(const struct refcounted_he *chain,
const char *key, U32 hash, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Search along a C chain for an entry with the key specified
by C and C. If C has the C
bit set, the key octets are interpreted as UTF-8, otherwise they
are interpreted as Latin-1. C is a precomputed hash of the key
string, or zero if it has not been precomputed. Returns a mortal scalar
representing the value associated with the key, or C<&PL_sv_placeholder>
if there is no value associated with the key.
=over 3
SV * refcounted_he_fetch_pvn(const struct refcounted_he *chain,
const char *keypv, STRLEN keylen,
U32 hash, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Like L, but takes a literal string
instead of a string/length pair, and no precomputed hash.
=over 3
SV * refcounted_he_fetch_pvs(const struct refcounted_he *chain,
"key", U32 flags)
=back
=back
=for hackers
Found in file hv.h
=over 4
=item C
X
Like L, but takes a Perl scalar instead of a
string/length pair.
=over 3
SV * refcounted_he_fetch_sv(const struct refcounted_he *chain,
SV *key, U32 hash, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Decrements the reference count of a C by one. If the
reference count reaches zero the structure's memory is freed, which
(recursively) causes a reduction of its parent C's
reference count. It is safe to pass a null pointer to this function:
no action occurs in this case.
=over 3
void refcounted_he_free(struct refcounted_he *he)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Increment the reference count of a C. The pointer to the
C is also returned. It is safe to pass a null pointer
to this function: no action occurs and a null pointer is returned.
=over 3
struct refcounted_he * refcounted_he_inc(
struct refcounted_he *he)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Like L, but takes a nul-terminated string instead
of a string/length pair.
=over 3
struct refcounted_he * refcounted_he_new_pv(
struct refcounted_he *parent,
const char *key, U32 hash,
SV *value, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Creates a new C. This consists of a single key/value
pair and a reference to an existing C chain (which may
be empty), and thus forms a longer chain. When using the longer chain,
the new key/value pair takes precedence over any entry for the same key
further along the chain.
The new key is specified by C and C. If C has
the C bit set, the key octets are interpreted
as UTF-8, otherwise they are interpreted as Latin-1. C is
a precomputed hash of the key string, or zero if it has not been
precomputed.
C is the scalar value to store for this key. C is copied
by this function, which thus does not take ownership of any reference
to it, and later changes to the scalar will not be reflected in the
value visible in the C. Complex types of scalar will not
be stored with referential integrity, but will be coerced to strings.
C may be either null or C<&PL_sv_placeholder> to indicate that no
value is to be associated with the key; this, as with any non-null value,
takes precedence over the existence of a value for the key further along
the chain.
C points to the rest of the C chain to be
attached to the new C. This function takes ownership
of one reference to C, and returns one reference to the new
C.
=over 3
struct refcounted_he * refcounted_he_new_pvn(
struct refcounted_he *parent,
const char *keypv,
STRLEN keylen, U32 hash,
SV *value, U32 flags)
=back
=back
=for hackers
Found in file hv.c
=over 4
=item C
X
Like L, but takes a literal string
instead of a string/length pair, and no precomputed hash.
=over 3
struct refcounted_he * refcounted_he_new_pvs(
struct refcounted_he *parent,
"key", SV *value, U32 flags)
=back
=back
=for hackers
Found in file hv.h
=over 4
=item C
X
Like L, but takes a Perl scalar instead of a
string/length pair.
=over 3
struct refcounted_he * refcounted_he_new_sv(
struct refcounted_he *parent,
SV *key, U32 hash, SV *value,
U32 flags)
=back
=back
=for hackers
Found in file hv.c
=head1 Input/Output
=over 4
=item C
X
The GV which was last used for a filehandle input operation. (C<< >>)
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
GV* PL_last_in_gv
=back
=back
=for hackers
Found in file intrpvar.h
=over 4
=item C
X
The glob containing the output field separator - C<*,> in Perl space.
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
GV* PL_ofsgv
=back
=back
=for hackers
Found in file intrpvar.h
=over 4
=item C
X
The input record separator - C<$/> in Perl space.
On threaded perls, each thread has an independent copy of this variable;
each initialized at creation time with the current value of the creating
thread's copy.
=over 3
SV* PL_rs
=back
=back
=for hackers
Found in file intrpvar.h
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
Function called by C to spawn a glob (or do the glob inside
perl on VMS). This code used to be inline, but now perl uses C
this glob starter is only used by miniperl during the build process,
or when PERL_EXTERNAL_GLOB is defined.
Moving it away shrinks F; shrinking F helps speed perl up.
NOTE: C must be explicitly called as
C
with an C parameter.
=over 3
PerlIO* Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
=back
=back
=for hackers
Found in file doio.c
=head1 Integer configuration values
There are only public API items currently in Integer configuration values
=head1 Lexer interface
=over 4
=item C
X
NOTE: C is B and may change or be
removed without notice.
This function performs syntax checking on a prototype, C.
If C is true, any illegal characters or mismatched brackets
will trigger illegalproto warnings, declaring that they were
detected in the prototype for C.
The return value is C if this is a valid prototype, and
C if it is not, regardless of whether C was C or
C.
Note that C is a valid C and will always return C.
=over 3
bool validate_proto(SV *name, SV *proto, bool warn,
bool curstash)
=back
=back
=for hackers
Found in file toke.c
=head1 Locales
There are only public API items currently in Locales
=head1 Magic
=over 4
=item C
X
Triggered by a delete from C<%^H>, records the key to
C.
=over 3
int magic_clearhint(SV* sv, MAGIC* mg)
=back
=back
=for hackers
Found in file mg.c
=over 4
=item C
X
Triggered by clearing C<%^H>, resets C.
=over 3
int magic_clearhints(SV* sv, MAGIC* mg)
=back
=back
=for hackers
Found in file mg.c
=over 4
=item C
X
Invoke a magic method (like FETCH).
C and C are the tied thingy and the tie magic.
C is the name of the method to call.
C is the number of args (in addition to $self) to pass to the method.
The C can be:
G_DISCARD invoke method with G_DISCARD flag and don't
return a value
G_UNDEF_FILL fill the stack with argc pointers to
PL_sv_undef
The arguments themselves are any values following the C argument.
Returns the SV (if any) returned by the method, or C on failure.
NOTE: C must be explicitly called as
C
with an C parameter.
=over 3
SV* Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth,
U32 flags, U32 argc, ...)
=back
=back
=for hackers
Found in file mg.c
=over 4
=item C