r64486 - in /branches/upstream/libjson-perl/current: Changes META.yml README lib/JSON.pm lib/JSON/PP.pm lib/JSON/PP5005.pm
angelabad-guest at users.alioth.debian.org
angelabad-guest at users.alioth.debian.org
Tue Nov 2 14:25:51 UTC 2010
Author: angelabad-guest
Date: Tue Nov 2 14:25:41 2010
New Revision: 64486
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64486
Log:
[svn-upgrade] new version libjson-perl (2.27)
Modified:
branches/upstream/libjson-perl/current/Changes
branches/upstream/libjson-perl/current/META.yml
branches/upstream/libjson-perl/current/README
branches/upstream/libjson-perl/current/lib/JSON.pm
branches/upstream/libjson-perl/current/lib/JSON/PP.pm
branches/upstream/libjson-perl/current/lib/JSON/PP5005.pm
Modified: branches/upstream/libjson-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/Changes?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/Changes (original)
+++ branches/upstream/libjson-perl/current/Changes Tue Nov 2 14:25:41 2010
@@ -15,6 +15,12 @@
!! Since 2.16, PP's relaxed option caused an infinite loop in some condition.
!! Recommend to update old versions.
+
+2.27 Sun Oct 31 20:32:46 2010
+ [JSON::PP]
+ - Some optimizations (gfx)
+ [JSON::PP::5005]
+ - added missing B module varibales (makamaka)
2.26 Tue Sep 28 17:41:37 2010
[JSON::PP]
Modified: branches/upstream/libjson-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/META.yml?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/META.yml (original)
+++ branches/upstream/libjson-perl/current/META.yml Tue Nov 2 14:25:41 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: JSON
-version: 2.26
+version: 2.27
abstract: JSON (JavaScript Object Notation) encoder/decoder
author:
- Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt>
Modified: branches/upstream/libjson-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/README?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/README (original)
+++ branches/upstream/libjson-perl/current/README Tue Nov 2 14:25:41 2010
@@ -1,4 +1,4 @@
-JSON version 2.26
+JSON version 2.27
=================
INSTALLATION
Modified: branches/upstream/libjson-perl/current/lib/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON.pm?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON.pm Tue Nov 2 14:25:41 2010
@@ -7,7 +7,7 @@
@JSON::EXPORT = qw(from_json to_json jsonToObj objToJson encode_json decode_json);
BEGIN {
- $JSON::VERSION = '2.26';
+ $JSON::VERSION = '2.27';
$JSON::DEBUG = 0 unless (defined $JSON::DEBUG);
}
@@ -611,7 +611,7 @@
=head1 VERSION
- 2.26
+ 2.27
This version is compatible with JSON::XS B<2.27> and later.
Modified: branches/upstream/libjson-perl/current/lib/JSON/PP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON/PP.pm?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON/PP.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON/PP.pm Tue Nov 2 14:25:41 2010
@@ -5,13 +5,13 @@
use 5.005;
use strict;
use base qw(Exporter);
-use overload;
+use overload ();
use Carp ();
use B ();
#use Devel::Peek;
-$JSON::PP::VERSION = '2.27007';
+$JSON::PP::VERSION = '2.27008';
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
@@ -409,10 +409,7 @@
my $flags = $b_obj->FLAGS;
return $value # as is
- if ( ( $flags & B::SVf_IOK or $flags & B::SVp_IOK
- or $flags & B::SVf_NOK or $flags & B::SVp_NOK
- ) and !($flags & B::SVf_POK )
- ); # SvTYPE is IV or NV?
+ if $flags & ( B::SVp_IOK | B::SVp_NOK ) and !( $flags & B::SVp_POK ); # SvTYPE is IV or NV?
my $type = ref($value);
@@ -492,11 +489,11 @@
sub blessed_to_json {
- my $b_obj = B::svref_2object($_[1]);
- if ($b_obj->isa('B::HV')) {
+ my $reftype = reftype($_[1]) || '';
+ if ($reftype eq 'HASH') {
return $_[0]->hash_to_json($_[1]);
}
- elsif ($b_obj->isa('B::AV')) {
+ elsif ($reftype eq 'ARRAY') {
return $_[0]->array_to_json($_[1]);
}
else {
@@ -744,11 +741,11 @@
$s = ''; # basically UTF8 flag on
if($ch eq '"' or ($singlequote and $ch eq "'")){
- my $boundChar = $ch if ($singlequote);
+ my $boundChar = $ch;
OUTER: while( defined(next_chr()) ){
- if((!$singlequote and $ch eq '"') or ($singlequote and $ch eq $boundChar)){
+ if($ch eq $boundChar){
next_chr();
if ($utf16) {
@@ -1284,6 +1281,7 @@
eval 'require Scalar::Util';
unless($@){
*JSON::PP::blessed = \&Scalar::Util::blessed;
+ *JSON::PP::reftype = \&Scalar::Util::reftype;
}
else{ # This code is from Sclar::Util.
# warn $@;
@@ -1291,6 +1289,27 @@
*JSON::PP::blessed = sub {
local($@, $SIG{__DIE__}, $SIG{__WARN__});
ref($_[0]) ? eval { $_[0]->a_sub_not_likely_to_be_here } : undef;
+ };
+ my %tmap = qw(
+ B::NULL SCALAR
+ B::HV HASH
+ B::AV ARRAY
+ B::CV CODE
+ B::IO IO
+ B::GV GLOB
+ B::REGEXP REGEXP
+ );
+ *JSON::PP::reftype = sub {
+ my $r = shift;
+
+ return undef unless length(ref($r));
+
+ my $t = ref(B::svref_2object($r));
+
+ return
+ exists $tmap{$t} ? $tmap{$t}
+ : length(ref($$r)) ? 'REF'
+ : 'SCALAR';
};
}
}
Modified: branches/upstream/libjson-perl/current/lib/JSON/PP5005.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjson-perl/current/lib/JSON/PP5005.pm?rev=64486&op=diff
==============================================================================
--- branches/upstream/libjson-perl/current/lib/JSON/PP5005.pm (original)
+++ branches/upstream/libjson-perl/current/lib/JSON/PP5005.pm Tue Nov 2 14:25:41 2010
@@ -5,7 +5,7 @@
my @properties;
-$JSON::PP5005::VERSION = '1.09';
+$JSON::PP5005::VERSION = '1.10';
BEGIN {
@@ -32,11 +32,9 @@
*JSON::PP::JSON_PP_decode_unicode = \&_decode_unicode;
# missing in B module.
- sub B::SVf_IOK () { 0x00010000; }
- sub B::SVf_NOK () { 0x00020000; }
- sub B::SVf_POK () { 0x00040000; }
sub B::SVp_IOK () { 0x01000000; }
sub B::SVp_NOK () { 0x02000000; }
+ sub B::SVp_POK () { 0x04000000; }
$INC{'bytes.pm'} = 1; # dummy
}
@@ -139,7 +137,7 @@
=head1 COPYRIGHT AND LICENSE
-Copyright 2007-2009 by Makamaka Hannyaharamitu
+Copyright 2007-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list