Revision history for MooseX-Storage
+ * always JSONify data with sorted keys, to handle hash order randomization
+ introduced in 5.17.* (RT#84287, Karen Etheridge)
+
0.32
* Change to use core Digest and Digest::SHA dists, rather than Digest::SHA1.
RT#69811
sub freeze {
my ( $self, @args ) = @_;
- my $json = JSON::Any->new->objToJson( $self->pack(@args) );
+ my $json = JSON::Any->new(canonical => 1)->objToJson( $self->pack(@args) );
utf8::decode($json) if !utf8::is_utf8($json) and utf8::valid($json); # if it's valid utf8 mark it as such
return $json;
}