summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2019-01-31 14:04:52 +1100
committerTony Cook <tony@develop-help.com>2019-08-08 15:28:35 +1000
commit20fbb8c297b88a2b4ad0fb679a190392299d875b (patch)
tree9460d1fe334dcde7fab9ad7fb3cecb2662c8efd0 /intrpvar.h
parent7b93aae2da4ca7f9087e33fb273354900e2f372e (diff)
downloadperl-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.h9
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 */