diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-12-18 22:35:51 +0000 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-01-25 15:02:58 +0000 |
commit | cc4aa2131ff2d87e0c3fa9bd8cf3bcfa66e245f3 (patch) | |
tree | f8a4918c97f3cb590e7d83703f7c61d2bd8d9e0c | |
parent | 59802880d7959408d0f0c8f818b71a12bba7d289 (diff) | |
download | perl-cc4aa2131ff2d87e0c3fa9bd8cf3bcfa66e245f3.tar.gz |
Emit experimental::builtin warnings from the builtin function callchecker
-rw-r--r-- | builtin.c | 8 | ||||
-rw-r--r-- | pod/perldiag.pod | 7 |
2 files changed, 15 insertions, 0 deletions
@@ -50,6 +50,10 @@ static OP *ck_builtin_const(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) { const struct BuiltinFuncDescriptor *builtin = NUM2PTR(const struct BuiltinFuncDescriptor *, SvUV(ckobj)); + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__BUILTIN), + "Built-in function '%s' is experimental", builtin->name); + SV *prototype = newSVpvs(""); SAVEFREESV(prototype); @@ -145,6 +149,10 @@ static OP *ck_builtin_func1(pTHX_ OP *entersubop, GV *namegv, SV *ckobj) { const struct BuiltinFuncDescriptor *builtin = NUM2PTR(const struct BuiltinFuncDescriptor *, SvUV(ckobj)); + Perl_ck_warner_d(aTHX_ + packWARN(WARN_EXPERIMENTAL__BUILTIN), + "Built-in function '%s' is experimental", builtin->name); + SV *prototype = newSVpvs("$"); SAVEFREESV(prototype); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 57b55d1a59..07b1166703 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -638,6 +638,13 @@ the warning gets raised. iterate over %ENV, it encountered a logical name or symbol definition which was too long, so it was truncated to the string shown. +=item Built-in function '%s' is experimental + +(S experimental::builtin) A call is being made to a function in the +C<builtin::> namespace, which is currently experimental. The existence +or nature of the function may be subject to change in a future version +of Perl. + =item Callback called exit (F) A subroutine invoked from an external package via call_sv() |