summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-08-27 09:09:46 -0600
committerKarl Williamson <khw@cpan.org>2020-09-05 10:15:53 -0600
commitd57dfc83cdfc361dd3d53681a4323a2ce79af799 (patch)
tree719809c03487ab3b897daebc7430cf30ca546cdf /cop.h
parent56e94d9863e17bba72825d92ffc23b32f0bde8cf (diff)
downloadperl-d57dfc83cdfc361dd3d53681a4323a2ce79af799.tar.gz
Document IN_PERL_(RUN|COMPILE)TIME
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/cop.h b/cop.h
index d7c42aae0e..49f1d0c12c 100644
--- a/cop.h
+++ b/cop.h
@@ -1111,11 +1111,20 @@ typedef struct stackinfo PERL_SI;
} \
} STMT_END
-#define IN_PERL_COMPILETIME cBOOL(PL_curcop == &PL_compiling)
-#define IN_PERL_RUNTIME cBOOL(PL_curcop != &PL_compiling)
-
+/*
+=for apidoc_section Utility Functions
+=for apidoc Amn|bool|IN_PERL_COMPILETIME
+Returns 1 if this macro is being called during the compilation phase of the
+program; otherwise 0;
+=for apidoc Amn|bool|IN_PERL_RUNTIME
+Returns 1 if this macro is being called during the execution phase of the
+program; otherwise 0;
+=cut
+*/
+#define IN_PERL_COMPILETIME cBOOL(PL_curcop == &PL_compiling)
+#define IN_PERL_RUNTIME cBOOL(PL_curcop != &PL_compiling)
/*
=for apidoc_section Multicall Functions