r11958 - in /branches/upstream/libjson-any-perl/current: Changes META.yml Makefile.PL lib/JSON/Any.pm t/00-load.t t/04-ENV.t t/10_unicode.t

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Thu Jan 3 23:35:04 UTC 2008


Author: gregoa-guest
Date: Thu Jan  3 23:35:04 2008
New Revision: 11958

URL: http://svn.debian.org/wsvn/?sc=1&rev=11958
Log:
[svn-upgrade] Integrating new upstream version, libjson-any-perl (1.15)

Modified:
    branches/upstream/libjson-any-perl/current/Changes
    branches/upstream/libjson-any-perl/current/META.yml
    branches/upstream/libjson-any-perl/current/Makefile.PL
    branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm
    branches/upstream/libjson-any-perl/current/t/00-load.t
    branches/upstream/libjson-any-perl/current/t/04-ENV.t
    branches/upstream/libjson-any-perl/current/t/10_unicode.t

Modified: branches/upstream/libjson-any-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/Changes?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/Changes (original)
+++ branches/upstream/libjson-any-perl/current/Changes Thu Jan  3 23:35:04 2008
@@ -1,7 +1,14 @@
 Revision history for JSON-Any
-1.14	???
+1.15	2008-01-02
+		* Update the config params for JSON and JSON/XS configuration
+		* Update JSON handler to always pass in the -support_by_pp option 
+		  if you don't want support_by_pp then don't use JSON.pm ... 
+		*** THIS VERSION WILL ONLY WORK ON 2.0+ VERSIONS OF THESE MODULES ***
+		
+1.14	2007-12-20
 		* Fix for the new JSON/JSON::XS 2.0
-		*** THIS UPGRADE WILL ONLY WORK ON 2.0+ VERSIONS OF THESE MODULES ***
+		*** THIS VERSION WILL ONLY WORK ON 2.0+ VERSIONS OF THESE MODULES ***
+
 1.13	2007-11-06
 		* Fix 10_unicode.t to skip_all if no supported unicode backend is found
 		 (reported by Andreas König)
@@ -10,43 +17,40 @@
 		* Fix issue with 05-JSON-Syck.t so we can pass our tests again
 
 1.11	17 Oct 2007
-        * fix issue with JSON::Syck when using Object API as reported by Miyagawa
+		* fix issue with JSON::Syck when using Object API as reported by Miyagawa
 
 1.10	12 Oct 2007
-        * fix issues from http://rt.cpan.org/Public/Bug/Display.html?id=29917
+		* fix issues from http://rt.cpan.org/Public/Bug/Display.html?id=29917
 
 1.09	10 Oct 2007
-        * also test for is_utf8() - nothingmuch
-        * improve unicode test	- nothingmuch
-        * add utf8 support for JSON::{Converter,Parser}	- nothingmuch
-        * Add a test for unicode strings	- nothingmuch
+		* also test for is_utf8() - nothingmuch
+		* improve unicode test	- nothingmuch
+		* add utf8 support for JSON::{Converter,Parser}	- nothingmuch
+		* Add a test for unicode strings	- nothingmuch
 
 1.08	18 May 2007
-
-        * Fix Packaging
-        * Fix JSON.pm backend tests 
-        * fix issues with JSON::XS being pedantic about how it's methods/functions are called
-        * added a carp requirement		
+		* Fix Packaging
+		* Fix JSON.pm backend tests 
+		* fix issues with JSON::XS being pedantic about how it's methods/functions are called
+		* added a carp requirement		
 
 1.07	???
-
-        * changed Makefile.PL to Module::Install
-        * helps if I test 04-ENV.t against the code it was designed for
-        * skip all 04-ENV.t until I get it working
-        * fixing tests
-        * change to skip_all based skippage
-        * add example directory
-        * pod updates
+		* changed Makefile.PL to Module::Install
+		* helps if I test 04-ENV.t against the code it was designed for
+		* skip all 04-ENV.t until I get it working
+		* fixing tests
+		* change to skip_all based skippage
+		* add example directory
+		* pod updates
 
 1.06	???
-
-        * cleaned up t/04-ENV.t to not require JSON::XS anymore
-        * fixed split on uninitalized value error
-        * cleaned up JSON-XS tests a bit
-        * added 04-ENV.t to MANIFEST
+		* cleaned up t/04-ENV.t to not require JSON::XS anymore
+		* fixed split on uninitalized value error
+		* cleaned up JSON-XS tests a bit
+		* added 04-ENV.t to MANIFEST
 
 ... History is Elusive ... 
 
 1.00    Fri Mar 23 10:24:50 EDT 2007
-        * Initial Release
-        * Currently only supports objToJson and jsonToObj
+		* Initial Release
+		* Currently only supports objToJson and jsonToObj

Modified: branches/upstream/libjson-any-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/META.yml?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/META.yml (original)
+++ branches/upstream/libjson-any-perl/current/META.yml Thu Jan  3 23:35:04 2008
@@ -18,4 +18,4 @@
     - t
 requires: 
   Carp: 0
-version: 1.14
+version: 1.15

Modified: branches/upstream/libjson-any-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/Makefile.PL?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/Makefile.PL (original)
+++ branches/upstream/libjson-any-perl/current/Makefile.PL Thu Jan  3 23:35:04 2008
@@ -10,7 +10,7 @@
 
 feature 'JSON',
   -default => 1,
-  'JSON'   => '2.01';
+  'JSON'   => '2.02';
 
 feature 'JSON::XS',
   -default   => 0,

Modified: branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm (original)
+++ branches/upstream/libjson-any-perl/current/lib/JSON/Any.pm Thu Jan  3 23:35:04 2008
@@ -1,6 +1,6 @@
 ##############################################################################
 # JSON::Any
-# v1.14
+# v1.15
 # Copyright (c) 2007 Chris Thompson
 ##############################################################################
 
@@ -16,11 +16,11 @@
 
 =head1 VERSION
 
-Version 1.14
-
-=cut
-
-our $VERSION = '1.14';
+Version 1.15
+
+=cut
+
+our $VERSION = '1.15';
 
 our $UTF8;
 
@@ -38,28 +38,41 @@
             create_object => sub {
                 require utf8;
                 utf8->import();
-                
+                JSON->import( '-support_by_pp', '-no_export' );
                 my ( $self, $conf ) = @_;
                 my @params = qw(
-                  autoconv
-                  skipinvalid
-                  execcoderef
+                  ascii
+                  latin1
+                  utf8
                   pretty
                   indent
-                  delimiter
-                  keysort
-                  convblessed
-                  selfconvert
-                  singlequote
-                  utf8
+                  space_before
+                  space_after
+                  relaxed
+                  canonical
+                  allow_nonref
+                  allow_blessed
+                  convert_blessed
+                  filter_json_object
+                  shrink
+                  max_depth
+                  max_size
+                  loose
+                  allow_bignum
+                  allow_barekey
+                  allow_singlequote
+                  escape_slash
+                  indent_length
+                  sort_by
                 );
-                                local $conf->{utf8} = !$conf->{utf8};    # it means the opposite
+                local $conf->{utf8} = !$conf->{utf8};    # it means the opposite
                 my $obj = $handler->new;
+
                 for my $mutator (@params) {
                     next unless exists $conf->{$mutator};
                     $obj = $obj->$mutator( $conf->{$mutator} );
                 }
-                
+
                 $self->[ENCODER] = 'encode';
                 $self->[DECODER] = 'decode';
                 $self->[HANDLER] = $obj;
@@ -90,15 +103,21 @@
 
                 my @params = qw(
                   ascii
+                  latin1
                   utf8
                   pretty
                   indent
                   space_before
                   space_after
+                  relaxed
                   canonical
                   allow_nonref
+                  allow_blessed
+                  convert_blessed
+                  filter_json_object
                   shrink
                   max_depth
+                  max_size
                 );
 
                 local $conf->{utf8} = !$conf->{utf8};    # it means the opposite

Modified: branches/upstream/libjson-any-perl/current/t/00-load.t
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/t/00-load.t?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/t/00-load.t (original)
+++ branches/upstream/libjson-any-perl/current/t/00-load.t Thu Jan  3 23:35:04 2008
@@ -1,8 +1,20 @@
 #!perl -T
 
-use Test::More tests => 7;
+use Test::More;
 
 BEGIN {
+
+    # Count who's installed
+    my @order = qw(JSON::XS JSON JSON::DWIW JSON::Syck);
+    my $count = scalar grep { eval "require $_"; not $@; } @order;
+
+    unless ($count) {    # need at least one
+        plan skip_all => "Can't find a JSON package.";
+        exit;
+    }
+
+    # if we're here we have *something* that will work
+    plan tests => 7;
     use_ok('JSON::Any');
 }
 
@@ -13,4 +25,4 @@
 can_ok( JSON::Any, qw(Dump Load ) );
 can_ok( JSON::Any, qw(encode decode ) );
 
-is(JSON::Any->objToJson({ foo => 'bar'}), q[{"foo":"bar"}]);
+is( JSON::Any->objToJson( { foo => 'bar' } ), q[{"foo":"bar"}] );

Modified: branches/upstream/libjson-any-perl/current/t/04-ENV.t
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/t/04-ENV.t?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/t/04-ENV.t (original)
+++ branches/upstream/libjson-any-perl/current/t/04-ENV.t Thu Jan  3 23:35:04 2008
@@ -1,8 +1,15 @@
 #!/usr/bin/perl -w
 
 use strict;
-use Test::More no_plan => 1;
-use JSON::Any;
+use Test::More;
+eval "use JSON::Any";
+
+if ($@) {
+    plan skip_all => "$@";
+}
+else {
+    plan no_plan => 1;
+}
 
 SKIP: {
     eval { require JSON; };
@@ -26,7 +33,7 @@
 
     my ($json);
     ok( $json = JSON::Any->new() );
-    eval { $json->encode("ü") };
+    eval { $json->encode("ü") };
     ok( $@, 'trapped a failure' );
     undef $@;
     $ENV{JSON_ANY_CONFIG} = 'allow_nonref=1';

Modified: branches/upstream/libjson-any-perl/current/t/10_unicode.t
URL: http://svn.debian.org/wsvn/branches/upstream/libjson-any-perl/current/t/10_unicode.t?rev=11958&op=diff
==============================================================================
--- branches/upstream/libjson-any-perl/current/t/10_unicode.t (original)
+++ branches/upstream/libjson-any-perl/current/t/10_unicode.t Thu Jan  3 23:35:04 2008
@@ -4,7 +4,12 @@
 use utf8;
 use Test::More;
 
-use JSON::Any;
+eval "use JSON::Any";
+
+if ($@) {
+    plan skip_all => "$@";
+    exit;
+}
 
 $ENV{JSON_ANY_CONFIG} = "utf8=1";
 




More information about the Pkg-perl-cvs-commits mailing list