-*- mode: Pod; buffer-read-only: t -*- !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by autodoc.pl extracting documentation from the C source files. Any changes made here will be lost! =head1 NAME perlintern - autogenerated documentation of purely B Perl functions =head1 DESCRIPTION X X This file is the autogenerated documentation of functions in the Perl interpreter that are documented using Perl's internal documentation format but are not marked as part of the Perl API. In other words, B! It has the same sections as L, though some may be empty. =head1 AV Handling =over 4 =item C X This is a cut-down version of av_fetch that assumes that the array is very straightforward - no magic, not readonly, and AvREAL - and that C is not negative. This function MUST NOT be used in situations where any of those assumptions may not hold. Returns the SV at the specified index in the array. The C is the index. If lval is true, you are guaranteed to get a real SV back (in case it wasn't real before), which you can then modify. Check that the return value is non-null before dereferencing it to a C. The rough perl equivalent is C. =over 3 SV ** av_fetch_simple(AV *av, SSize_t key, I32 lval) =back =back =for hackers Found in file inline.h =over 4 =item C X If the array C is empty, this returns -1; otherwise it returns the maximum value of the indices of all the array elements which are currently defined in C. 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 =over 4 =item C X This implements L> and L>, which are the public API for this functionality. Creates a new AV and allocates its SV* array. This is similar to, but more efficient than doing: AV *av = newAV(); av_extend(av, key); The size parameter is used to pre-allocate a SV* array large enough to hold at least elements C. C must be at least 1. The C parameter controls whether or not the array is NULL initialized. =over 3 AV * av_new_alloc(SSize_t size, bool zeroflag) =back =back =for hackers Found in file inline.h =over 4 =item C X This is a cut-down version of av_store that assumes that the array is very straightforward - no magic, not readonly, and AvREAL - and that C is not negative. This function MUST NOT be used in situations where any of those assumptions may not hold. Stores an SV in an array. The array index is specified as C. It can be dereferenced to get the C that was stored there (= C)). Note that the caller is responsible for suitably incrementing the reference count of C before the call. Approximate Perl equivalent: C. =over 3 SV ** av_store_simple(AV *av, SSize_t key, SV *val) =back =back =for hackers Found in file inline.h =head1 Callback Functions =over 4 =item C X C> It is planned to remove C from a future release of Perl. Do not use it for new code; remove it from existing code. Implements the deprecated L>. =over 3 U8 dowantarray() =back =back =for hackers Found in file pp_ctl.c =over 4 =item C X Implements C which you should use instead. =over 3 void leave_scope(I32 base) =back =back =for hackers Found in file scope.c =over 4 =item C X This function is called via magic to implement the C and C functions. It should not be called directly and has no user servicable parts. =over 3 int magic_freedestruct(SV *sv, MAGIC *mg) =back =back =for hackers Found in file scope.c =over 4 =item C X This function arranges for a C function reference to be called at the B with the arguments provided. It is a wrapper around C which ensures that the latter function is called appropriately. Be aware that there is a signficant difference in timing between the I and the I. If you are looking for a mechanism to trigger a function at the end of the B you should look at L> instead of this function. =over 3 void mortal_svfunc_x(SVFUNC_t f, SV *p) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements L> =over 3 void pop_scope() =back =back =for hackers Found in file scope.c =over 4 =item C X Implements L> =over 3 void push_scope() =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. =over 3 void save_adelete(AV *av, SSize_t key) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Saves and frees a refcounted string. Calls rcpv_free() on the argument when the current pseudo block is finished. =over 3 void save_freercpv(char *rcpv) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Like save_pptr(), but also Safefree()s the new value if it is different from the old one. Can be used to restore a global char* to its prior contents, freeing new value. =over 3 void save_generic_pvref(char **str) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Like save_sptr(), but also SvREFCNT_dec()s the new value. Can be used to restore a global SV to its prior contents, freeing new value. =over 3 void save_generic_svref(SV **sptr) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. =over 3 void save_hdelete(HV *hv, SV *keysv) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. =over 3 void save_hints() =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. =over 3 void save_op() =back =back =for hackers Found in file scope.h =over 4 =item C X Implements C. =over 3 void save_padsv_and_mortalize(PADOFFSET off) =back =back =for hackers Found in file scope.c =over 4 =item C X The refcnt of object C will be decremented at the end of the current I. C gives the type of C, expressed as one of the constants in F whose name begins with C. This is the underlying implementation of several macros, like C. =over 3 void save_pushptr(void * const ptr, const int type) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Saves and restores a refcounted string, similar to what save_generic_svref would do for a SV*. Can be used to restore a refcounted string to its previous state. Performs the appropriate refcount counting so that nothing should leak or be prematurely freed. =over 3 void save_rcpv(char **prcpv) =back =back =for hackers Found in file scope.c =over 4 =item C X A helper function for localizing the SV referenced by C. If C is set in in C, the function returns the input scalar untouched. Otherwise it replaces C with a new C scalar, and returns that. The new scalar will have the old one's magic (if any) copied to it. If there is such magic, and C is set in in C, 'set' magic will be processed on the new scalar. If unset, 'set' magic will be skipped. The latter typically means that assignment will soon follow (I, S>), and that will handle the magic. =over 3 SV * save_scalar_at(SV **sptr, const U32 flags) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Set the SvFLAGS specified by mask to the values in val =over 3 void save_set_svflags(SV *sv, U32 mask, U32 val) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. Like save_generic_pvref(), but uses PerlMemShared_free() rather than Safefree(). Can be used to restore a shared global char* to its prior contents, freeing new value. =over 3 void save_shared_pvref(char **str) =back =back =for hackers Found in file scope.c =over 4 =item C X Implements C. =over 3 void save_vptr(void *ptr) =back =back =for hackers Found in file scope.c =head1 Casting X There are currently no internal API items in Casting =head1 Character case changing There are currently no internal API items in Character case changing =head1 Character classification There are currently no internal API items in Character classification =head1 Compiler and Preprocessor information There are currently no internal API items in Compiler and Preprocessor information =head1 Compiler directives There are currently no internal API items 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, token 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(token which, arg) =back =back =for hackers Found in file op.h =head1 Concurrency =over 4 =item C =item C =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =over 3 CX_CUR() =back =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =over 3 void CX_LEAVE_SCOPE(PERL_CONTEXT* cx) =back =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =over 3 void CX_POP(PERL_CONTEXT* cx) =back =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =over 3 void dounwind(I32 cxix) =back =back =for hackers Found in file pod/perlguts.pod =over 4 =item C X This is for the use of C as a wrapper for the C library L on some platforms to hide some platform quirks. It should not be used except through C. =over 3 Pid_t my_fork() =back =back =for hackers Found in file util.c =over 4 =item C Described in L. =back =for hackers Found in file pod/perlguts.pod =head1 COPs and Hint Hashes There are currently no internal API items in COPs and 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 If true, indicates that the C member contains an SV pointer whose reference count should be decremented when the CV itself is freed. In addition, C will increment the reference count, and C will duplicate the entire pointed-to SV if this flag is set. Any CV that wraps an XSUB has an C union that the XSUB function is free to use for its own purposes. It may be the case that the code wishes to store an SV in the C member of this union. By setting this flag, this SV reference will be properly reclaimed or duplicated when the CV itself is. =over 3 bool CvREFCOUNTED_ANYSV(CV *cv) =back =back =for hackers Found in file cv.h =over 4 =item C X Helper macro to turn off the C flag. =over 3 void CvREFCOUNTED_ANYSV_off(CV *cv) =back =back =for hackers Found in file cv.h =over 4 =item C X Helper macro to turn on the C flag. =over 3 void CvREFCOUNTED_ANYSV_on(CV *cv) =back =back =for hackers Found in file cv.h =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 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 Interpose, for the current op and RUNOPS loop, - a new JMPENV stack catch frame, and - an inner RUNOPS loop to run all the remaining ops following the current PL_op. Then handle any exceptions raised while in that loop. For a caught eval at this level, re-enter the loop with the specified restart op (i.e. the op following the OP_LEAVETRY etc); otherwise re-throw the exception. docatch() is intended to be used like this: PP(pp_entertry) { if (CATCH_GET) return docatch(Perl_pp_entertry); ... rest of function ... return PL_op->op_next; } If a new catch frame isn't needed, the op behaves normally. Otherwise it calls docatch(), which recursively calls pp_entertry(), this time with CATCH_GET() false, so the rest of the body of the entertry is run. Then docatch() calls CALLRUNOPS() which executes all the ops following the entertry. When the loop finally finishes, control returns to docatch(), which pops the JMPENV and returns to the parent pp_entertry(), which itself immediately returns. Note that *all* subsequent ops are run within the inner RUNOPS loop, not just the body of the eval. For example, in sub TIEARRAY { eval {1}; my $x } tie @a, "main"; at the point the 'my' is executed, the C stack will look something like: #10 main() #9 perl_run() # JMPENV_PUSH level 1 here #8 S_run_body() #7 Perl_runops_standard() # main RUNOPS loop #6 Perl_pp_tie() #5 Perl_call_sv() #4 Perl_runops_standard() # unguarded RUNOPS loop: no new JMPENV #3 Perl_pp_entertry() #2 S_docatch() # JMPENV_PUSH level 2 here #1 Perl_runops_standard() # docatch()'s RUNOPs loop #0 Perl_pp_padsv() Basically, any section of the perl core which starts a RUNOPS loop may make a promise that it will catch any exceptions and restart the loop if necessary. If it's not prepared to do that (like call_sv() isn't), then it sets CATCH_GET() to true, so that any later eval-like code knows to set up a new handler and loop (via docatch()). See L for further details. =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 Some functions when compiled under DEBUGGING take an extra final argument named C, indicating the C stack depth. This argument is omitted otherwise. This macro expands to either S> under DEBUGGING, or to nothing at all when not under DEBUGGING, reducing the number of C's in the code. The program is responsible for maintaining the correct value for C. =over 3 comma_aDEPTH =back =back =for hackers Found in file perl.h =over 4 =item C X This is used in the prototype declarations for functions that take a L> final parameter, much like L|perlguts/Background and MULTIPLICITY> is used in functions that take a thread context initial parameter. =back =for hackers Found in file perl.h =over 4 =item C X Implements B perl command line option on OP C. =over 3 I32 debop(const OP *o) =back =back =for hackers Found in file dump.c =over 4 =item C X Called to indicate that C was executed, for profiling purposes under the C command line option. =over 3 void debprof(const OP *o) =back =back =for hackers Found in file dump.c =over 4 =item C X Dumps the contents of the data collected by the C perl command line option. =over 3 void debprofdump() =back =back =for hackers Found in file dump.c =over 4 =item C X Same as L> but with no leading argument. Intended for functions with no normal arguments, and used by L> itself. =over 3 debug_aDEPTH =back =back =for hackers Found in file perl.h =over 4 =item C X Same as L> but with no leading argument. Intended for functions with no normal arguments, and used by L> itself. =over 3 debug_pDEPTH =back =back =for hackers Found in file perl.h =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 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 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 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 =over 4 =item C Described in L. =over 3 int runops_debug() =back =back =for hackers Found in file pod/perlguts.pod =over 4 =item C Described in L. =over 3 int runops_standard() =back =back =for hackers Found in file pod/perlguts.pod =head1 Display functions XXX =over 4 =item C X Implements C =over 3 char * sv_peek(SV *sv) =back =back =for hackers Found in file dump.c =head1 Embedding, Threads, 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 Implements L>, which you should use instead. =over 3 void * get_context() =back =back =for hackers Found in file inline.h =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 gets 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 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 =over 4 =item C X Implements L>, which you should use instead. =over 3 void set_context(void *t) =back =back =for hackers Found in file util.c =over 4 =item C X Duplicate a stack info structure, returning a pointer to the cloned object. =over 3 PERL_SI * si_dup(PERL_SI *si, CLONE_PARAMS *param) =back =back =for hackers Found in file sv.c =over 4 =item C X Duplicate the save stack, returning a pointer to the cloned object. =over 3 ANY * ss_dup(PerlInterpreter *proto_perl, CLONE_PARAMS *param) =back =back =for hackers Found in file sv.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 currently no internal API items in Exception Handling (simple) Macros =head1 Filesystem configuration values There are currently no internal API items in Filesystem configuration values =head1 Floating point There are currently no internal API items in Floating point =head1 General Configuration There are currently no internal API items in General Configuration =head1 Global Variables There are currently no internal API items in Global Variables =head1 GV Handling and Stashes X =over 4 =item C X Check C to see if the overloaded (active magic) operation C applies to it. If the sv is not SvROK or it is not an object then returns false, otherwise checks if the object is blessed into a class supporting overloaded operations, and returns true if a call to amagic_call() with this SV and the given method would trigger an amagic operation, including via the overload fallback rules or via nomethod. Thus a call like: amagic_applies(sv, string_amg, AMG_unary) would return true for an object with overloading set up in any of the following ways: use overload q("") => sub { ... }; use overload q(0+) => sub { ... }, fallback => 1; and could be used to tell if a given object would stringify to something other than the normal default ref stringification. Note that the fact that this function returns TRUE does not mean you can succesfully perform the operation with amagic_call(), for instance any overloaded method might throw a fatal exception, however if this function returns FALSE you can be confident that it will NOT perform the given overload operation. C is an integer enum, one of the values found in F, for instance C. C should be set to AMG_unary for unary operations. =over 3 bool amagic_applies(SV *sv, int method, int flags) =back =back =for hackers Found in file gv.c =over 4 =item C X Duplicate a typeglob, returning a pointer to the cloned object. =over 3 GP * gp_dup(GP * const gp, CLONE_PARAMS * const param) =back =back =for hackers Found in file sv.c =over 4 =item C X Implements C, which you should use instead =over 3 CV * gv_handler(HV *stash, I32 id) =back =back =for hackers Found in file gv.c =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