projects
/
gitmo/MooseX-Storage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
8cd124d
)
fix checksuming
Yuval Kogman [Sun, 15 Jul 2007 15:41:08 +0000 (15:41 +0000)]
lib/MooseX/Storage/Base/WithChecksum.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/MooseX/Storage/Base/WithChecksum.pm
b/lib/MooseX/Storage/Base/WithChecksum.pm
index
a1215e4
..
cf1ebdf
100644
(file)
--- a/
lib/MooseX/Storage/Base/WithChecksum.pm
+++ b/
lib/MooseX/Storage/Base/WithChecksum.pm
@@
-49,7
+49,12
@@
sub _digest_packed {
{
local $Data::Dumper::Indent = 0;
local $Data::Dumper::Sortkeys = 1;
- $d->add( Data::Dumper::Dumper($collapsed) );
+ local $Data::Dumper::Terse = 1;
+ local $Data::Dumper::Useqq = 0;
+ local $Data::Dumper::Deparse = 0; # FIXME?
+ my $str = Data::Dumper::Dumper($collapsed);
+ $str =~ s/(?<! ['"] ) \b (\d+) \b (?! ['"] )/'$1'/gx; # canonicalize numbers to strings even if it mangles numbers inside strings
+ $d->add( $str );
}
return $d->hexdigest;