From: Stevan Little Date: Fri, 11 May 2007 19:30:18 +0000 (+0000) Subject: foo X-Git-Tag: 0_02~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88651e76ff418daf49a8b2b7f3bf4604af87d6ff;p=gitmo%2FMooseX-Storage.git foo --- diff --git a/lib/MooseX/Storage/Base/WithChecksum.pm b/lib/MooseX/Storage/Base/WithChecksum.pm index ffa34b2..d2aa691 100644 --- a/lib/MooseX/Storage/Base/WithChecksum.pm +++ b/lib/MooseX/Storage/Base/WithChecksum.pm @@ -8,6 +8,8 @@ use MooseX::Storage::Engine; our $VERSION = '0.01'; +our $DIGEST_MARKER = '__DIGEST__' + sub pack { my ($self, @args ) = @_; @@ -15,7 +17,7 @@ sub pack { my $collapsed = $e->collapse_object; - $collapsed->{__DIGEST__} = $self->_digest_packed($collapsed, @args); + $collapsed->{$DIGEST_MARKER} = $self->_digest_packed($collapsed, @args); return $collapsed; } @@ -25,8 +27,8 @@ sub unpack { # check checksum on data - my $old_checksum = $data->{__DIGEST__}; - delete $data->{__DIGEST__}; + my $old_checksum = $data->{$DIGEST_MARKER}; + delete $data->{$DIGEST_MARKER}; my $checksum = $class->_digest_packed($data, @args);