References to version objects should stringify as VSTRING. This makes
Nicholas Clark [Mon, 5 Dec 2005 21:58:20 +0000 (21:58 +0000)]
stringification consistent with the output of ref().

p4raw-id: //depot/perl@26266

sv.c

diff --git a/sv.c b/sv.c
index e63531a..e59e6eb 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -2680,7 +2680,8 @@ Perl_sv_2pv_flags(pTHX_ register SV *sv, STRLEN *lp, I32 flags)
                case SVt_PV:
                case SVt_PVIV:
                case SVt_PVNV:
-               case SVt_PVBM:  typestr = SvROK(sv) ? "REF" : "SCALAR"; break;
+               case SVt_PVBM:  typestr = SvVOK(sv) ? "VSTRING"
+                                   : SvROK(sv) ? "REF" : "SCALAR"; break;
                case SVt_PVLV:  typestr = SvROK(sv) ? "REF"
                                /* tied lvalues should appear to be
                                 * scalars for backwards compatitbility */