diff options
author | Tony Cook <tony@develop-help.com> | 2019-01-31 14:04:52 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-08-08 15:28:35 +1000 |
commit | 20fbb8c297b88a2b4ad0fb679a190392299d875b (patch) | |
tree | 9460d1fe334dcde7fab9ad7fb3cecb2662c8efd0 /intrpvar.h | |
parent | 7b93aae2da4ca7f9087e33fb273354900e2f372e (diff) | |
download | perl-20fbb8c297b88a2b4ad0fb679a190392299d875b.tar.gz |
(perl #132777) document and add PL_curcop to the API
PL_curcop is used fairly widely on CPAN, mostly to get the current
line number and file, to check lexical hints, or to check the
stash.
Diffstat (limited to 'intrpvar.h')
-rw-r--r-- | intrpvar.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intrpvar.h b/intrpvar.h index 3d93216200..0416d412ff 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -122,6 +122,15 @@ PERLVARI(I, utf8cache, I8, PERL___I) /* Is the utf8 caching code enabled? */ PERLVAR(I, defstash, HV *) /* main symbol table */ PERLVAR(I, curstash, HV *) /* symbol table for current package */ +/* +=for apidoc Amn|COP*|PL_curcop + +The currently active COP (control op) roughly representing the current +statement in the source. + +=cut +*/ + PERLVAR(I, curcop, COP *) PERLVAR(I, curstack, AV *) /* THE STACK */ PERLVAR(I, curstackinfo, PERL_SI *) /* current stack + context */ |