Re: Data::Dumper bug?
Yitzchak Scott-Thoennes [Mon, 8 Aug 2005 20:33:02 +0000 (13:33 -0700)]
Message-ID: <20050809033301.GA3804@efn.org>

p4raw-id: //depot/perl@25308

ext/Data/Dumper/Dumper.pm
ext/Data/Dumper/Dumper.xs

index ef4da8a..bb7916b 100644 (file)
@@ -9,7 +9,7 @@
 
 package Data::Dumper;
 
-$VERSION = '2.121_07';
+$VERSION = '2.121_08';
 
 #$| = 1;
 
index 3db74ae..2552391 100644 (file)
@@ -614,9 +614,11 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
                 I32 nlen;
                bool do_utf8 = FALSE;
 
-                if ((sortkeys && !(keys && (I32)i <= av_len(keys))) ||
-                    !(entry = hv_iternext((HV *)ival)))
-                    break;
+               if (sortkeys) {
+                   if (!(keys && (I32)i <= av_len(keys))) break;
+               } else {
+                   if (!(entry = hv_iternext((HV *)ival))) break;
+               }
 
                if (i)
                    sv_catpvn(retval, ",", 1);