From: Florian Ragwitz Date: Tue, 7 Sep 2010 22:13:57 +0000 (+0200) Subject: Inline the deprecated PL_no_symref X-Git-Tag: 0.05~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FSub-Name.git;a=commitdiff_plain;h=65b620ddc50aeaecea9945eeeaf971909cf6e963 Inline the deprecated PL_no_symref It was deprecated in 5.11.2 and the recommendation is to inline one's own copy of it into code that needs it. We're doing just that (on all perls, not just one ones where it's deprecated). Closes RT#57843. --- diff --git a/Changes b/Changes index e98267c..800eb30 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + * Stop using the deprecated PL_no_symref (Closes RT#57843). + 0.04 -- Fri Jul 18 15:23 CEST 2008 * Fixed for perl 5.6 and 5.005 threads (tested) diff --git a/Name.xs b/Name.xs index b32411b..9b38b05 100644 --- a/Name.xs +++ b/Name.xs @@ -1,5 +1,5 @@ /* Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved. - * This program is free software; you can redistribute it and/or modify + * This program is free software; you can redistribute it and/or modify * it under the same terms as Perl itself. */ @@ -41,7 +41,8 @@ subname(name, sub) else if (!SvOK(sub)) croak(PL_no_usym, "a subroutine"); else if (PL_op->op_private & HINT_STRICT_REFS) - croak(PL_no_symref, SvPV_nolen(sub), "a subroutine"); + croak("Can't use string (\"%.32s\") as %s ref while \"strict refs\" in use", + SvPV_nolen(sub), "a subroutine"); else if ((gv = gv_fetchpv(SvPV_nolen(sub), FALSE, SVt_PVCV))) cv = GvCVu(gv); if (!cv)