Adjust tests that were setting the wrong values and the default happened to work.
* Change to use core Digest and Digest::SHA dists, rather than Digest::SHA1.
RT##69811
+ * Create a JSON::Any object, so setting $ENV{JSON_ANY_CONFIG} works.
+ Adjust tests that were setting the wrong values and the default happened to work.
0.31
* Add example for add_custom_type_handler to the MooseX::Storage::Engine docs. (perigrin)
sub thaw {
my ( $class, $json, @args ) = @_;
utf8::encode($json) if utf8::is_utf8($json);
- $class->unpack( JSON::Any->jsonToObj($json), @args );
+ $class->unpack( JSON::Any->new->jsonToObj($json), @args );
}
sub freeze {
my ( $self, @args ) = @_;
- my $json = JSON::Any->objToJson( $self->pack(@args) );
+ my $json = JSON::Any->new->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;
}
# - SL
BEGIN {
$ENV{JSON_ANY_ORDER} = qw(XS);
- $ENV{JSON_ANY_CONFIG} = "utf8=1";
+ $ENV{JSON_ANY_CONFIG} = "utf8=0";
}
plan tests => 16;
# - SL
BEGIN {
$ENV{JSON_ANY_ORDER} = qw(XS);
- $ENV{JSON_ANY_CONFIG} = "utf8=1";
+ $ENV{JSON_ANY_CONFIG} = "utf8=0";
}
plan tests => 8;
use_ok('MooseX::Storage');
# - SL
BEGIN {
$ENV{JSON_ANY_ORDER} = qw(XS);
- $ENV{JSON_ANY_CONFIG} = "utf8=1";
+ $ENV{JSON_ANY_CONFIG} = "utf8=0";
}
plan tests => 8;
use_ok('MooseX::Storage');