This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Dumper.xs, use sv_newmortal() instead of sv_mortalcopy(&PL_sv_undef).
authorNicholas Clark <nick@ccl4.org>
Wed, 7 Sep 2011 21:00:10 +0000 (23:00 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 7 Sep 2011 21:00:10 +0000 (23:00 +0200)
The two produce identical results. The former is terser, and far more
efficient.

dist/Data-Dumper/Dumper.pm
dist/Data-Dumper/Dumper.xs
pod/perldelta.pod

index 9335d03..8835721 100644 (file)
@@ -9,7 +9,7 @@
 
 package Data::Dumper;
 
-$VERSION = '2.133'; # Don't forget to set version and release date in POD!
+$VERSION = '2.134'; # Don't forget to set version and release date in POD!
 
 #$| = 1;
 
@@ -1297,7 +1297,7 @@ modify it under the same terms as Perl itself.
 
 =head1 VERSION
 
-Version 2.133  (July 20 2011)
+Version 2.134  (September 7 2011)
 
 =head1 SEE ALSO
 
index cf0717e..c8e96cd 100644 (file)
@@ -703,11 +703,11 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
                if (sortkeys) {
                    char *key;
                    svp = av_fetch(keys, i, FALSE);
-                   keysv = svp ? *svp : sv_mortalcopy(&PL_sv_undef);
+                   keysv = svp ? *svp : sv_newmortal();
                    key = SvPV(keysv, keylen);
                    svp = hv_fetch((HV*)ival, key,
                                    SvUTF8(keysv) ? -(I32)keylen : (I32)keylen, 0);
-                   hval = svp ? *svp : sv_mortalcopy(&PL_sv_undef);
+                   hval = svp ? *svp : sv_newmortal();
                }
                else {
                    keysv = hv_iterkeysv(entry);
index e714e2f..5d39bc9 100644 (file)
@@ -155,6 +155,12 @@ descriptions [perl #94488].
 
 =item *
 
+L<Data::Dumper> has been upgraded from version 2.133 to version 2.134.
+
+The XS code for sorting hash keys has been simplified slightly.
+
+=item *
+
 L<Locale::Codes> has been upgraded from version 3.17 to version 3.18.
 
 The CIA world added non-standard values, so this is no longer used as a source