For state vars, C<SVs_PADSTALE> is overloaded to mean 'not yet initialised',
but this internal state is stored in a separate pad entry.
-=for apidoc AmxU|PADNAMELIST *|PL_comppad_name
+=for apidoc Amnh||SVs_PADSTALE
+
+=for apidoc AmnxU|PADNAMELIST *|PL_comppad_name
During compilation, this points to the array containing the names part
of the pad for the currently-compiling code.
-=for apidoc AmxU|PAD *|PL_comppad
+=for apidoc AmnxU|PAD *|PL_comppad
During compilation, this points to the array containing the values
part of the pad for the currently-compiling code. (At runtime a CV may
At runtime, this points to the array containing the currently-relevant
values for the pad for the currently-executing code.
-=for apidoc AmxU|SV **|PL_curpad
+=for apidoc AmnxU|SV **|PL_curpad
Points directly to the body of the L</PL_comppad> array.
(I.e., this is C<PadARRAY(PL_comppad)>.)
{
/* diag_listed_as: Variable "%s" is not available */
Perl_ck_warner(aTHX_ packWARN(WARN_CLOSURE),
- "%se \"%" PNf "\" is not available",
+ "%s \"%" PNf "\" is not available",
*PadnamePV(name) == '&'
- ? "Subroutin"
- : "Variabl",
+ ? "Subroutine"
+ : "Variable",
PNfARG(name));
}
/* diag_listed_as: Variable "%s" will not stay
shared */
Perl_warner(aTHX_ packWARN(WARN_CLOSURE),
- "%se \"%" UTF8f "\" will not stay shared",
- *namepv == '&' ? "Subroutin" : "Variabl",
+ "%s \"%" UTF8f "\" will not stay shared",
+ *namepv == '&' ? "Subroutine" : "Variable",
UTF8fARG(1, namelen, namepv));
}
* from the parent */
if (const_sv && SvREFCNT(const_sv) == 2) {
const bool was_method = cBOOL(CvMETHOD(cv));
- bool copied = FALSE;
if (outside) {
PADNAME * const pn =
PadlistNAMESARRAY(CvPADLIST(outside))
) == o
&& !OpSIBLING(o))
{
- Perl_ck_warner_d(aTHX_
- packWARN(WARN_DEPRECATED),
- "Constants from lexical "
- "variables potentially "
- "modified elsewhere are "
- "deprecated. This will not "
- "be allowed in Perl 5.32");
- /* We *copy* the lexical variable, and donate the
- copy to newCONSTSUB. Yes, this is ugly, and
- should be killed. We need to do this for the
- time being, however, because turning on SvPADTMP
- on a lexical will have observable effects
- elsewhere. */
- const_sv = newSVsv(const_sv);
- copied = TRUE;
+ Perl_croak(aTHX_
+ "Constants from lexical variables potentially modified "
+ "elsewhere are no longer permitted");
}
else
goto constoff;
}
}
- if (!copied)
- SvREFCNT_inc_simple_void_NN(const_sv);
+ SvREFCNT_inc_simple_void_NN(const_sv);
/* If the lexical is not used elsewhere, it is safe to turn on
SvPADTMP, since it is only when it is used in lvalue con-
text that the difference is observable. */
included. If the first argument is neither a CV nor a GV, this flag is
ignored (subject to change).
+=for apidoc Amnh||CV_NAME_NOTQUAL
+
=cut
*/
the outer pad name that this one mirrors. The returned pad name has the
C<PADNAMEt_OUTER> flag already set.
+=for apidoc Amnh||PADNAMEt_OUTER
+
=cut
*/