Skip to content

Commit

Permalink
check from_json, to_json
Browse files Browse the repository at this point in the history
  • Loading branch information
makamaka committed Aug 25, 2010
1 parent 82861c5 commit 72cf854
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 3 additions & 5 deletions Changes
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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. !! Since 2.16, PP's relaxed option caused an infinite loop in some condition.
!! Recommend to update old versions. !! Recommend to update old versions.


[JSON] 2.22 Wed Aug 25 12:46:13 2010
- check that to_json and from_json are not called as methods (CHORNY)


2.21_001 Thu Aug 19 16:52:43 2010
[JSON] [JSON]
- added JSON::XS installing feature in Makefile.PL - 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] [JSON::PP]
- modified for -Duse64bitall -Duselongdouble compiled perl. - modified for -Duse64bitall -Duselongdouble compiled perl.
11_pc_expo.t too. (these are patched by H.Merijn Brand) 11_pc_expo.t too. (these are patched by H.Merijn Brand)
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SYNOPSIS
# recommend to use (en|de)code_json. # recommend to use (en|de)code_json.


VERSION VERSION
2.21 2.22


This version is compatible with JSON::XS 2.27 and later. This version is compatible with JSON::XS 2.27 and later.


Expand Down
8 changes: 4 additions & 4 deletions lib/JSON.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use base qw(Exporter);
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json); @JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);


BEGIN { BEGIN {
$JSON::VERSION = '2.21_001'; $JSON::VERSION = '2.22';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG); $JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
} }


Expand Down Expand Up @@ -128,7 +128,7 @@ sub objToJson {
# INTERFACES # INTERFACES


sub to_json ($@) { 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."; Carp::croak "to_json should not be called as a method.";
} }
my $json = new JSON; my $json = new JSON;
Expand All @@ -145,7 +145,7 @@ sub to_json ($@) {




sub from_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."; Carp::croak "from_json should not be called as a method.";
} }
my $json = new JSON; my $json = new JSON;
Expand Down Expand Up @@ -614,7 +614,7 @@ JSON - JSON (JavaScript Object Notation) encoder/decoder
=head1 VERSION =head1 VERSION
2.21 2.22
This version is compatible with JSON::XS B<2.27> and later. This version is compatible with JSON::XS B<2.27> and later.
Expand Down
2 changes: 1 addition & 1 deletion lib/JSON/PP.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use Carp ();
use B (); use B ();
#use Devel::Peek; #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); @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);


Expand Down

0 comments on commit 72cf854

Please sign in to comment.