summaryrefslogtreecommitdiff
path: root/ext/Data/Dumper
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-16 16:49:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-16 16:49:55 +0000
commit45b49486f748a106f98e7237be0fb2c953389866 (patch)
tree8175e05652e920d830d3f13edb6038309989713f /ext/Data/Dumper
parentd728199f8fa72dc33b858d549365cfdf2cb2dca0 (diff)
downloadperl-45b49486f748a106f98e7237be0fb2c953389866.tar.gz
dump C<0> as such, not C<'0'>
p4raw-id: //depot/perl@3540
Diffstat (limited to 'ext/Data/Dumper')
-rw-r--r--ext/Data/Dumper/Dumper.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/Data/Dumper/Dumper.pm b/ext/Data/Dumper/Dumper.pm
index b1fd2b790a..d653af336b 100644
--- 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