On Sat, Jan 29, 2011 at 05:12:17PM +0800, jida...@jidanni.org wrote: > Package: perl-doc > Version: 5.10.1-17 > Severity: wishlist > File: /usr/share/man/man3/Data::Dumper.3perl.gz > > I recommend you add a clarification to > > o $Data::Dumper::Sortkeys or $OBJ->Sortkeys([NEWVAL]) > > Can be set to a boolean value to control whether hash keys > are dumped in sorted order. A true value will cause the keys > of all hashes to be dumped in Perl's default sort order.
> ALL hashes? > print Dumper(%h); > $Data::Dumper::Sortkeys = 1; > print Dumper(%h); You aren't dumping a hash, you're dumping a list of scalar values. Quoting the BUGS section: Due to limitations of Perl subroutine call semantics, you cannot pass an array or hash. Prepend it with a "\" to pass its reference instead. This will be remedied in time, now that Perl has subroutine prototypes. $Data::Dumper::Sortkeys works fine when you pass it a hash reference. -- Niko Tyni nt...@debian.org -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org