perldiag: Retitle ‘Cannot copy’
authorFather Chrysostomos <sprout@cpan.org>
Fri, 16 Dec 2011 22:05:28 +0000 (14:05 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 16 Dec 2011 22:05:28 +0000 (14:05 -0800)
Without the ‘in %s’ it covers both forms of the error message.

pod/perldiag.pod
sv.c
t/porting/diag.t

index 4f65deb..02366e3 100644 (file)
@@ -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 cf29ffa..dec1794 100644 (file)
--- 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);
index 50aa996..a2e6e06 100644 (file)
@@ -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