r4453 - in /packages/libdata-dump-perl/branches/upstream/current: Changes lib/Data/Dump.pm t/dump.t

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Nov 29 18:48:17 CET 2006


Author: eloy
Date: Wed Nov 29 18:48:17 2006
New Revision: 4453

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4453
Log:
Load /tmp/tmp.MIydNI7160/libdata-dump-perl-1.08 into
packages/libdata-dump-perl/branches/upstream/current.

Modified:
    packages/libdata-dump-perl/branches/upstream/current/Changes
    packages/libdata-dump-perl/branches/upstream/current/lib/Data/Dump.pm
    packages/libdata-dump-perl/branches/upstream/current/t/dump.t

Modified: packages/libdata-dump-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdata-dump-perl/branches/upstream/current/Changes?rev=4453&op=diff
==============================================================================
--- packages/libdata-dump-perl/branches/upstream/current/Changes (original)
+++ packages/libdata-dump-perl/branches/upstream/current/Changes Wed Nov 29 18:48:17 2006
@@ -1,3 +1,12 @@
+2006-11-29  Gisle Aas <gisle at ActiveState.com>
+
+   Release 1.08
+
+   By popular demand; don't put underscore into dumped integers
+   to group thousands.
+
+
+
 2006-11-24  Gisle Aas <gisle at ActiveState.com>
 
    Release 1.07

Modified: packages/libdata-dump-perl/branches/upstream/current/lib/Data/Dump.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdata-dump-perl/branches/upstream/current/lib/Data/Dump.pm?rev=4453&op=diff
==============================================================================
--- packages/libdata-dump-perl/branches/upstream/current/lib/Data/Dump.pm (original)
+++ packages/libdata-dump-perl/branches/upstream/current/lib/Data/Dump.pm Wed Nov 29 18:48:17 2006
@@ -7,7 +7,7 @@
 *import = \&Exporter::import;
 @EXPORT_OK=qw(dump pp);
 
-$VERSION = "1.07";  # $Date: 2006/11/24 16:23:06 $
+$VERSION = "1.08";  # $Date: 2006/11/29 10:47:17 $
 $DEBUG = 0;
 
 use overload ();
@@ -181,15 +181,8 @@
 	    if (!defined $$rval) {
 		$out = "undef";
 	    }
-	    elsif ($$rval =~ /^-?[1-9]\d{0,8}$/ || $$rval eq "0") {
-		if (length $$rval > 4) {
-		    # Separate thousands by _ to make it more readable
-		    $out = reverse $$rval;
-		    $out =~ s/(\d\d\d)(?=\d)/$1_/g;
-		    $out = reverse $out;
-		} else {
-		    $out = $$rval;
-		}
+	    elsif ($$rval =~ /^-?[1-9]\d{0,9}$/ || $$rval eq "0") {
+		$out = $$rval;
 	    }
 	    else {
 		$out = quote($$rval);

Modified: packages/libdata-dump-perl/branches/upstream/current/t/dump.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdata-dump-perl/branches/upstream/current/t/dump.t?rev=4453&op=diff
==============================================================================
--- packages/libdata-dump-perl/branches/upstream/current/t/dump.t (original)
+++ packages/libdata-dump-perl/branches/upstream/current/t/dump.t Wed Nov 29 18:48:17 2006
@@ -11,10 +11,10 @@
 ok(dump(undef), "undef");
 ok(dump(0), "0");
 ok(dump(1234), "1234");
-ok(dump(12345), "12_345");
-ok(dump(12345678), "12_345_678");
+ok(dump(12345), "12345");
+ok(dump(12345678), "12345678");
 ok(dump(-33), "-33");
-ok(dump(-123456), "-123_456");
+ok(dump(-1.5), "\"-1.5\"");
 ok(dump("0123"), qq("0123"));
 ok(dump(1..5), "(1, 2, 3, 4, 5)");
 ok(dump([1..5]), "[1, 2, 3, 4, 5]");




More information about the Pkg-perl-cvs-commits mailing list