Hello community,

here is the log from the commit of package perl-JSON for openSUSE:Factory 
checked in at 2011-11-21 12:41:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-JSON (Old)
 and      /work/SRC/openSUSE:Factory/.perl-JSON.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-JSON", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-JSON/perl-JSON.changes      2011-09-23 
12:37:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-JSON.new/perl-JSON.changes 2011-11-21 
12:41:56.000000000 +0100
@@ -1,0 +2,10 @@
+Fri Nov 18 13:41:56 UTC 2011 - co...@suse.com
+
+- update to 2.53
+    - made Makefile.PL skipping a installing XS question
+      when set $ENV{PERL_ONLY} or $ENV{NO_XS} (rt#66820)
+    - fixed to_json (pointed and patched by mmcleric in rt#68359)
+    - backport JSON::PP 2.27200
+  * fixed incr_parse docodeing string more correctly (rt#68032 by LCONS)
+
+-------------------------------------------------------------------

Old:
----
  JSON-2.51.tar.gz

New:
----
  JSON-2.53.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-JSON.spec ++++++
--- /var/tmp/diff_new_pack.THG9JE/_old  2011-11-21 12:41:58.000000000 +0100
+++ /var/tmp/diff_new_pack.THG9JE/_new  2011-11-21 12:41:58.000000000 +0100
@@ -18,15 +18,14 @@
 
 
 Name:           perl-JSON
-Version:        2.51
+Version:        2.53
 Release:        4
 License:        GPL+ or Artistic
 %define cpan_name JSON
 Summary:        JSON (JavaScript Object Notation) encoder/decoder
 Url:            http://search.cpan.org/dist/JSON/
 Group:          Development/Libraries/Perl
-#Source:         
http://www.cpan.org/authors/id/M/MA/MAKAMAKA/JSON-%{version}.tar.gz
-Source:         %{cpan_name}-%{version}.tar.gz
+Source:         
http://www.cpan.org/authors/id/M/MA/MAKAMAKA/JSON-%{version}.tar.gz
 Patch0:         fix_provides.diff
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ JSON-2.51.tar.gz -> JSON-2.53.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/Changes new/JSON-2.53/Changes
--- old/JSON-2.51/Changes       2011-03-08 08:03:56.000000000 +0100
+++ new/JSON-2.53/Changes       2011-05-22 09:13:52.000000000 +0200
@@ -22,6 +22,15 @@
 They are JSNO::backportPP. So JSON.pm should work as it did at all!
 --------------------------------------------------------------------------
 
+2.53  Sun May 22 16:11:05 2011
+       - made Makefile.PL skipping a installing XS question
+            when set $ENV{PERL_ONLY} or $ENV{NO_XS} (rt#66820)
+
+2.52  Sun May 22 15:05:49 2011
+       - fixed to_json (pointed and patched by mmcleric in rt#68359)
+       - backport JSON::PP 2.27200
+            * fixed incr_parse docodeing string more correctly (rt#68032 by 
LCONS)
+
 2.51  Tue Mar  8 16:03:34 2011
        - import JSON::PP 2.27105 as BackportPP
        - fixed documentations (pointed by Britton Kerin and rt#64738)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/MANIFEST new/JSON-2.53/MANIFEST
--- old/JSON-2.51/MANIFEST      2010-12-20 08:41:45.000000000 +0100
+++ new/JSON-2.53/MANIFEST      2011-05-22 08:10:30.000000000 +0200
@@ -50,6 +50,8 @@
 t/e13_overloaded_eq.t
 t/e14_decode_prefix.t
 t/e15_tie_ixhash.t
+t/e16_incr_parse_fixed.t
+t/e90_misc.t
 t/x00_load.t
 t/x02_error.t
 t/x12_blessed.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/META.yml new/JSON-2.53/META.yml
--- old/JSON-2.51/META.yml      2011-03-08 08:20:55.000000000 +0100
+++ new/JSON-2.53/META.yml      2011-05-22 09:18:22.000000000 +0200
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               JSON
-version:            2.51
+version:            2.53
 abstract:           JSON (JavaScript Object Notation) encoder/decoder
 author:
     - Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/Makefile.PL new/JSON-2.53/Makefile.PL
--- old/JSON-2.51/Makefile.PL   2010-12-20 08:41:45.000000000 +0100
+++ new/JSON-2.53/Makefile.PL   2011-05-22 09:06:07.000000000 +0200
@@ -25,6 +25,7 @@
 my $has_xs      = 0;
 my $xs_ver_is_ok;
 my $message;
+my $pp_only = $ENV{ PERL_ONLY } || $ENV{ NO_XS };
 
 eval q| require JSON::XS |;
 
@@ -63,7 +64,7 @@
 
 my @prereq_pm;
 
-if ( can_auto_xs_install() and not $xs_ver_is_ok ) {
+if ( not $pp_only and can_auto_xs_install() and not $xs_ver_is_ok ) {
 
     my $prompt = prompt("Do you want to install JSON::XS?(Y/n)", 'Y');
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/README new/JSON-2.53/README
--- old/JSON-2.51/README        2011-03-08 07:59:46.000000000 +0100
+++ new/JSON-2.53/README        2011-05-22 09:14:17.000000000 +0200
@@ -1,4 +1,4 @@
-JSON version 2.51
+JSON version 2.53
 =================
 
 JSON::PP was inculded in JSON distribution (CPAN module).
@@ -56,7 +56,7 @@
      # recommend to use (en|de)code_json.
 
 VERSION
-        2.51
+        2.53
 
     This version is compatible with JSON::XS 2.27 and later.
 
@@ -344,7 +344,7 @@
 
 COMMON OBJECT-ORIENTED INTERFACE
   new
-        $json = new JSON
+        $json = JSON->new
 
     Returns a new "JSON" object inherited from either JSON::XS or JSON::PP
     that can be used to de/encode JSON strings.
@@ -1545,7 +1545,7 @@
     The relese of this new version owes to the courtesy of Marc Lehmann.
 
 COPYRIGHT AND LICENSE
-    Copyright 2005-2010 by Makamaka Hannyaharamitu
+    Copyright 2005-2011 by Makamaka Hannyaharamitu
 
     This library is free software; you can redistribute it and/or modify it
     under the same terms as Perl itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/lib/JSON/backportPP.pm 
new/JSON-2.53/lib/JSON/backportPP.pm
--- old/JSON-2.51/lib/JSON/backportPP.pm        2011-03-08 07:30:52.000000000 
+0100
+++ new/JSON-2.53/lib/JSON/backportPP.pm        2011-05-22 08:00:58.000000000 
+0200
@@ -12,7 +12,7 @@
 use B ();
 #use Devel::Peek;
 
-$JSON::PP::VERSION = '2.27105';
+$JSON::PP::VERSION = '2.27200';
 
 @JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
 
@@ -1462,7 +1462,7 @@
 
     if ( defined wantarray ) {
 
-        $self->{incr_mode} = INCR_M_WS;
+        $self->{incr_mode} = INCR_M_WS unless defined $self->{incr_mode};
 
         if ( wantarray ) {
             my @ret;
@@ -1473,10 +1473,10 @@
                 push @ret, $self->_incr_parse( $coder, $self->{incr_text} );
 
                 unless ( !$self->{incr_nest} and $self->{incr_mode} == 
INCR_M_JSON ) {
-                    $self->{incr_mode} = INCR_M_WS;
+                    $self->{incr_mode} = INCR_M_WS if $self->{incr_mode} != 
INCR_M_STR;
                 }
 
-            } until ( !$self->{incr_text} );
+            } until ( length $self->{incr_text} >= $self->{incr_p} );
 
             $self->{incr_parsing} = 0;
 
@@ -1515,6 +1515,10 @@
         my $s = substr( $text, $p++, 1 );
 
         if ( $s eq '"' ) {
+            if (substr( $text, $p - 2, 1 ) eq '\\' ) {
+                next;
+            }
+
             if ( $self->{incr_mode} != INCR_M_STR  ) {
                 $self->{incr_mode} = INCR_M_STR;
             }
@@ -1548,6 +1552,7 @@
 
     $self->{incr_p} = $p;
 
+    return if ( $self->{incr_mode} == INCR_M_STR and not $self->{incr_nest} );
     return if ( $self->{incr_mode} == INCR_M_JSON and $self->{incr_nest} > 0 );
 
     return '' unless ( length substr( $self->{incr_text}, 0, $p ) );
@@ -1628,9 +1633,9 @@
 
 =head1 VERSION
 
-    2.27105
+    2.27200
 
-L<JSON::XS> 2.27 compatible.
+L<JSON::XS> 2.27 (~2.30) compatible.
 
 =head1 DESCRIPTION
 
@@ -1806,7 +1811,7 @@
 
 =head2 new
 
-    $json = new JSON::PP
+    $json = JSON::PP->new
 
 Rturns a new JSON::PP object that can be used to de/encode JSON
 strings.
@@ -2784,7 +2789,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2007-2010 by Makamaka Hannyaharamitu
+Copyright 2007-2011 by Makamaka Hannyaharamitu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/lib/JSON.pm new/JSON-2.53/lib/JSON.pm
--- old/JSON-2.51/lib/JSON.pm   2011-03-08 07:52:55.000000000 +0100
+++ new/JSON-2.53/lib/JSON.pm   2011-05-22 09:10:24.000000000 +0200
@@ -7,7 +7,7 @@
 @JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json 
decode_json);
 
 BEGIN {
-    $JSON::VERSION = '2.51';
+    $JSON::VERSION = '2.53';
     $JSON::DEBUG   = 0 unless (defined $JSON::DEBUG);
     $JSON::DEBUG   = $ENV{ PERL_JSON_DEBUG } if exists $ENV{ PERL_JSON_DEBUG };
 }
@@ -15,7 +15,7 @@
 my $Module_XS  = 'JSON::XS';
 my $Module_PP  = 'JSON::PP';
 my $Module_bp  = 'JSON::backportPP'; # included in JSON distribution
-my $PP_Version = '2.27105';
+my $PP_Version = '2.27200';
 my $XS_Version = '2.27';
 
 
@@ -136,7 +136,10 @@
 # INTERFACES
 
 sub to_json ($@) {
-    if ( ref($_[0]) eq 'JSON' or $_[0] eq 'JSON' ) {
+    if (
+        ref($_[0]) eq 'JSON'
+        or (@_ > 2 and $_[0] eq 'JSON')
+    ) {
         Carp::croak "to_json should not be called as a method.";
     }
     my $json = new JSON;
@@ -637,7 +640,7 @@
  
 =head1 VERSION
 
-    2.51
+    2.53
 
 This version is compatible with JSON::XS B<2.27> and later.
 
@@ -2255,7 +2258,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2005-2010 by Makamaka Hannyaharamitu
+Copyright 2005-2011 by Makamaka Hannyaharamitu
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself. 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/t/e16_incr_parse_fixed.t 
new/JSON-2.53/t/e16_incr_parse_fixed.t
--- old/JSON-2.51/t/e16_incr_parse_fixed.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/JSON-2.53/t/e16_incr_parse_fixed.t      2011-05-22 07:59:15.000000000 
+0200
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+BEGIN {
+    $ENV{ PERL_JSON_BACKEND } = $ARGV[0] || 'JSON::backportPP';
+}
+
+use strict;
+use Test::More tests => 4;
+
+use JSON;
+
+my $json = JSON->new->allow_nonref();
+
+my @vs = $json->incr_parse('"a\"bc');
+
+ok( not scalar(@vs) );
+
+@vs = $json->incr_parse('"');
+
+is( $vs[0], "a\"bc" );
+
+
+$json = JSON->new;
+
+@vs = $json->incr_parse('"a\"bc');
+ok( not scalar(@vs) );
+@vs = eval { $json->incr_parse('"') };
+ok($@ =~ qr/JSON text must be an object or array/);
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/JSON-2.51/t/e90_misc.t new/JSON-2.53/t/e90_misc.t
--- old/JSON-2.51/t/e90_misc.t  1970-01-01 01:00:00.000000000 +0100
+++ new/JSON-2.53/t/e90_misc.t  2011-05-22 08:02:49.000000000 +0200
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use strict;
+use Test::More tests => 4;
+
+BEGIN {
+    $ENV{ PERL_JSON_BACKEND } = $ARGV[0] || 'JSON::backportPP';
+}
+
+use JSON;
+
+# reported by https://rt.cpan.org/Public/Bug/Display.html?id=68359
+
+eval { JSON->to_json( 5, { allow_nonref => 1 } ) };
+ok($@);
+
+is( q{"5"}, JSON::to_json( "5", { allow_nonref => 1 } ) );
+is( q{5},  JSON::to_json( 5, { allow_nonref => 1 } ) );
+is( q{"JSON"}, JSON::to_json( 'JSON', { allow_nonref => 1 } ) );

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to