diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-11-15 16:29:16 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-11-15 16:31:58 +0000 |
commit | def89bff35e7f449eacdd8db98c267bd0fc7bce4 (patch) | |
tree | 1621b9f8946c8707adaa9433ad09617d056753a5 /pp.c | |
parent | 973a76153032581ad3a0224d9cb13b7191f46ee5 (diff) | |
download | perl-def89bff35e7f449eacdd8db98c267bd0fc7bce4.tar.gz |
Inline PL_no_symref_sv into its users. Deprecate the visible global variable.
As the core no longer needs this fixed string outside of pp.c, it seems daft to
make it public just in case any module wants to use it. Modules that do should
provide their own inline copy in future.
Also restore the visible global PL_no_symref_sv back to the original format
specificiation (of 5.10.0 and earlier).
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -130,6 +130,9 @@ PP(pp_padhv) /* Translations. */ +const char S_no_symref_sv[] = + "Can't use string (\"%" SVf32 "\"%s) as %s ref while \"strict refs\" in use"; + PP(pp_rv2gv) { dVAR; dSP; dTOPss; @@ -202,7 +205,7 @@ PP(pp_rv2gv) } else { if (PL_op->op_private & HINT_STRICT_REFS) - DIE(aTHX_ PL_no_symref_sv, sv, (SvCUR(sv)>32 ? "..." : ""), "a symbol"); + DIE(aTHX_ S_no_symref_sv, sv, (SvCUR(sv)>32 ? "..." : ""), "a symbol"); if ((PL_op->op_private & (OPpLVAL_INTRO|OPpDONT_INIT_GV)) == OPpDONT_INIT_GV) { /* We are the target of a coderef assignment. Return @@ -232,7 +235,7 @@ Perl_softref2xv(pTHX_ SV *const sv, const char *const what, if (PL_op->op_private & HINT_STRICT_REFS) { if (SvOK(sv)) - Perl_die(aTHX_ PL_no_symref_sv, sv, (SvCUR(sv)>32 ? "..." : ""), what); + Perl_die(aTHX_ S_no_symref_sv, sv, (SvCUR(sv)>32 ? "..." : ""), what); else Perl_die(aTHX_ PL_no_usym, what); } |