projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d728199
)
dump C<0> as such, not C<'0'>
author
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 16 Jun 1999 16:49:55 +0000
(16:49 +0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Wed, 16 Jun 1999 16:49:55 +0000
(16:49 +0000)
p4raw-id: //depot/perl@3540
ext/Data/Dumper/Dumper.pm
patch
|
blob
|
history
diff --git
a/ext/Data/Dumper/Dumper.pm
b/ext/Data/Dumper/Dumper.pm
index
b1fd2b7
..
d653af3
100644
(file)
--- a/
ext/Data/Dumper/Dumper.pm
+++ b/
ext/Data/Dumper/Dumper.pm
@@
-389,7
+389,7
@@
sub _dump {
elsif (!defined($val)) {
$out .= "undef";
}
- elsif ($val =~ /^
-?[1-9]\d{0,8}
$/) { # safe decimal number
+ elsif ($val =~ /^
(?:0|-?[1-9]\d{0,8})
$/) { # safe decimal number
$out .= $val;
}
else { # string