Skip to content
Browse files

check from_json, to_json

  • Loading branch information...
1 parent 82861c5 commit 72cf854c142f86cd1ca45811044c70709b6e5c14 @makamaka makamaka committed Aug 25, 2010
Showing with 9 additions and 11 deletions.
  1. +3 −5 Changes
  2. +1 −1 README
  3. +4 −4 lib/JSON.pm
  4. +1 −1 lib/JSON/PP.pm
View
8 Changes
@@ -16,13 +16,11 @@ In this version, JSON was totally rewritten.
!! Since 2.16, PP's relaxed option caused an infinite loop in some condition.
!! Recommend to update old versions.
- [JSON]
- - check that to_json and from_json are not called as methods (CHORNY)
-
-
-2.21_001 Thu Aug 19 16:52:43 2010
+2.22 Wed Aug 25 12:46:13 2010
[JSON]
- added JSON::XS installing feature in Makefile.PL
+ with cpan or cpanm (some points suggested by gfx)
+ - check that to_json and from_json are not called as methods (CHORNY)
[JSON::PP]
- modified for -Duse64bitall -Duselongdouble compiled perl.
11_pc_expo.t too. (these are patched by H.Merijn Brand)
View
2 README
@@ -45,7 +45,7 @@ SYNOPSIS
# recommend to use (en|de)code_json.
VERSION
- 2.21
+ 2.22
This version is compatible with JSON::XS 2.27 and later.
View
8 lib/JSON.pm
@@ -7,7 +7,7 @@ use base qw(Exporter);
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
- $JSON::VERSION = '2.21_001';
+ $JSON::VERSION = '2.22';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
}
@@ -128,7 +128,7 @@ sub objToJson {
# INTERFACES
sub to_json ($@) {
- if (ref $_[0] and ref($_[0]) eq 'JSON') {
+ if ( ref($_[0]) eq 'JSON' or $_[0] eq 'JSON' ) {
Carp::croak "to_json should not be called as a method.";
}
my $json = new JSON;
@@ -145,7 +145,7 @@ sub to_json ($@) {
sub from_json ($@) {
- if (ref $_[0] and ref($_[0]) eq 'JSON') {
+ if ( ref($_[0]) eq 'JSON' or $_[0] eq 'JSON' ) {
Carp::croak "from_json should not be called as a method.";
}
my $json = new JSON;
@@ -614,7 +614,7 @@ JSON - JSON (JavaScript Object Notation) encoder/decoder
=head1 VERSION
- 2.21
+ 2.22
This version is compatible with JSON::XS B<2.27> and later.
View
2 lib/JSON/PP.pm
@@ -11,7 +11,7 @@ use Carp ();
use B ();
#use Devel::Peek;
-$JSON::PP::VERSION = '2.27003_001';
+$JSON::PP::VERSION = '2.27004';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);

0 comments on commit 72cf854

Please sign in to comment.
Something went wrong with that request. Please try again.