Revision history for MooseX-Storage
-0.08
+0.09
+ * MooseX::Storage::Util
+ - added support to deal with utf8 strings correctly
+
+0.08 Wed. Oct. 10, 2007
* MooseX::Storage::Format::JSON
- added support to deal with utf8 strings correctly
use Moose qw(confess blessed);
use MooseX::Storage::Engine ();
+use utf8 ();
-our $VERSION = '0.02';
+our $VERSION = '0.03';
our $AUTHORITY = 'cpan:STEVAN';
sub peek {
eval { JSON::Any->import };
confess "Could not load JSON module because : $@" if $@;
+ utf8::encode($json) if utf8::is_utf8($json);
+
my $data = eval { JSON::Any->jsonToObj($json) };
if ($@) {
confess "There was an error when attempting to peek at JSON: $@";
require Best;
eval { Best->import([[ qw[YAML::Syck YAML] ]]) };
confess "Could not load YAML module because : $@" if $@;
-
my $inflater = Best->which('YAML::Syck')->can('Load');