From 4040665ab6aa79d4f0e579522c09d3f2832279d5 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 16 Dec 2011 14:05:28 -0800 Subject: =?UTF-8?q?perldiag:=20Retitle=20=E2=80=98Cannot=20copy=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without the ‘in %s’ it covers both forms of the error message. --- pod/perldiag.pod | 2 +- sv.c | 1 + t/porting/diag.t | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 4f65deb945..02366e3164 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -587,7 +587,7 @@ in it, then tried to access that symbol via conventional Perl syntax. The access triggers Perl to autovivify that typeglob, but it there is no legal conversion from that type of reference to a typeglob. -=item Cannot copy to %s in %s +=item Cannot copy to %s (P) Perl detected an attempt to copy a value to an internal type that cannot be directly assigned to. diff --git a/sv.c b/sv.c index cf29ffad54..dec1794d6f 100644 --- a/sv.c +++ b/sv.c @@ -4097,6 +4097,7 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags) } else if (dtype == SVt_PVAV || dtype == SVt_PVHV) { const char * const type = sv_reftype(dstr,0); if (PL_op) + /* diag_listed_as: Cannot copy to %s */ Perl_croak(aTHX_ "Cannot copy to %s in %s", type, OP_DESC(PL_op)); else Perl_croak(aTHX_ "Cannot copy to %s", type); diff --git a/t/porting/diag.t b/t/porting/diag.t index 50aa996f3d..a2e6e06bde 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -366,7 +366,6 @@ Bad symbol for %s bad top format reference Bizarre copy of %s Bizarre SvTYPE [%d] -Cannot copy to %s Can't call method "%s" %s Can't coerce readonly %s to string Can't coerce readonly %s to string in %s -- cgit v1.2.1