use JSON::XS 2.0 or newer
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 14 Jul 2008 16:37:34 +0000 (16:37 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 14 Jul 2008 16:37:34 +0000 (16:37 +0000)
git-svn-id: https://perl-cwmp.googlecode.com/svn/trunk@242 836a5e1a-633d-0410-964b-294494ad4392

Makefile.PL
lib/CWMP/Store/JSON.pm

index 80c47eb..7306e39 100644 (file)
@@ -34,7 +34,7 @@ features(
        ],
        'CWMP::Store::JSON' => [
                -default => 1,
-               'JSON::XS',
+               'JSON::XS' => 2.0,
        ],
        'Command-line access to modems (tcli.pl)' => [
                -default => 1,
index 43b1d44..12c2b02 100644 (file)
@@ -33,12 +33,12 @@ sub file {
 
 sub save_hash {
        my ( $self, $file, $hash ) = @_;
-       write_file( $file, to_json $hash );
+       write_file( $file, encode_json $hash );
 }
 
 sub load_hash {
        my ( $self, $file ) = @_;
-       from_json read_file( $file );
+       decode_json read_file( $file );
 }
 
 sub extension { '.js' };