Re: Data::Dumper bug?
authorYitzchak Scott-Thoennes <sthoenna@efn.org>
Mon, 8 Aug 2005 20:33:02 +0000 (13:33 -0700)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 19 Aug 2005 12:54:46 +0000 (12:54 +0000)
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);