Merge branch 'master' into engine_traits
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Util.pm
index ec23204..fdfbf96 100644 (file)
@@ -4,7 +4,7 @@ use Moose qw(confess blessed);
 use MooseX::Storage::Engine ();
 use utf8 ();
 
-our $VERSION   = '0.03';
+our $VERSION   = '0.18';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub peek {
@@ -31,12 +31,11 @@ sub peek {
 
 sub _inflate_json {
     my ($class, $json) = @_;
-    
-    require JSON::Any;
-    eval { JSON::Any->import };
+
+    eval { require JSON::Any; JSON::Any->import };
     confess "Could not load JSON module because : $@" if $@; 
     
-    utf8::encode($json) if utf8::is_utf8($json) or utf8::valid($json);    
+    utf8::encode($json) if utf8::is_utf8($json);    
     
     my $data = eval { JSON::Any->jsonToObj($json) };
     if ($@) {
@@ -142,7 +141,7 @@ Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2007 by Infinity Interactive, Inc.
+Copyright 2007-2008 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>