r8346 - in /trunk/libjson-any-perl: Changes MANIFEST META.yml Makefile.PL debian/changelog lib/JSON/Any.pm t/05-JSON-Syck.t
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Fri Oct 19 15:31:19 UTC 2007
Author: eloy
Date: Fri Oct 19 15:31:19 2007
New Revision: 8346
URL: http://svn.debian.org/wsvn/?sc=1&rev=8346
Log:
new upstream version
Added:
trunk/libjson-any-perl/t/05-JSON-Syck.t
- copied unchanged from r8345, branches/upstream/libjson-any-perl/current/t/05-JSON-Syck.t
Modified:
trunk/libjson-any-perl/Changes
trunk/libjson-any-perl/MANIFEST
trunk/libjson-any-perl/META.yml
trunk/libjson-any-perl/Makefile.PL
trunk/libjson-any-perl/debian/changelog
trunk/libjson-any-perl/lib/JSON/Any.pm
Modified: trunk/libjson-any-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/Changes?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/Changes (original)
+++ trunk/libjson-any-perl/Changes Fri Oct 19 15:31:19 2007
@@ -1,4 +1,7 @@
Revision history for JSON-Any
+
+1.11 17 Oct 2007
+ o fix issue with JSON::Syck when using Object API as reported by Miyagawa
1.10 12 Oct 2007
o fix issues from http://rt.cpan.org/Public/Bug/Display.html?id=29917
Modified: trunk/libjson-any-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/MANIFEST?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/MANIFEST (original)
+++ trunk/libjson-any-perl/MANIFEST Fri Oct 19 15:31:19 2007
@@ -20,6 +20,7 @@
t/02-JSON-XS.t
t/03-JSON-DWIW.t
t/04-ENV.t
+t/05-JSON-Syck.t
t/10_unicode.t
t/kwalitee.t
t/pod-coverage.t
Modified: trunk/libjson-any-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/META.yml?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/META.yml (original)
+++ trunk/libjson-any-perl/META.yml Fri Oct 19 15:31:19 2007
@@ -17,4 +17,4 @@
- t
requires:
Carp: 0
-version: 1.10
+version: 1.11
Modified: trunk/libjson-any-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/Makefile.PL?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/Makefile.PL (original)
+++ trunk/libjson-any-perl/Makefile.PL Fri Oct 19 15:31:19 2007
@@ -1,4 +1,5 @@
# Drop-in replacement to ExtUtils::MakeMaker
+use 5.8.3;
use inc::Module::Install;
# Define metadata
Modified: trunk/libjson-any-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/debian/changelog?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/debian/changelog (original)
+++ trunk/libjson-any-perl/debian/changelog Fri Oct 19 15:31:19 2007
@@ -1,3 +1,10 @@
+libjson-any-perl (1.11-1) unstable; urgency=low
+
+ * New upstream release
+ fix issue with JSON::Syck when using Object API as reported by Miyagawa
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Fri, 19 Oct 2007 17:28:00 +0200
+
libjson-any-perl (1.10-1) unstable; urgency=low
* New upstream release
Modified: trunk/libjson-any-perl/lib/JSON/Any.pm
URL: http://svn.debian.org/wsvn/trunk/libjson-any-perl/lib/JSON/Any.pm?rev=8346&op=diff
==============================================================================
--- trunk/libjson-any-perl/lib/JSON/Any.pm (original)
+++ trunk/libjson-any-perl/lib/JSON/Any.pm Fri Oct 19 15:31:19 2007
@@ -1,6 +1,6 @@
##############################################################################
# JSON::Any
-# v1.10
+# v1.11
# Copyright (c) 2007 Chris Thompson
##############################################################################
@@ -16,11 +16,11 @@
=head1 VERSION
-Version 1.10
-
-=cut
-
-our $VERSION = '1.10';
+Version 1.11
+
+=cut
+
+our $VERSION = '1.11';
our $UTF8;
@@ -52,7 +52,8 @@
);
$self->[ENCODER] = 'objToJson';
$self->[DECODER] = 'jsonToObj';
- $self->[HANDLER] = $handler->new( map { $_ => $conf->{$_} } @params );
+ $self->[HANDLER] =
+ $handler->new( map { $_ => $conf->{$_} } @params );
},
},
@@ -65,7 +66,8 @@
croak "JSON::DWIW does not support utf8" if $conf->{utf8};
$self->[ENCODER] = 'to_json';
$self->[DECODER] = 'from_json';
- $self->[HANDLER] = $handler->new( { map { $_ => $conf->{$_} } @params } );
+ $self->[HANDLER] =
+ $handler->new( { map { $_ => $conf->{$_} } @params } );
},
},
@@ -90,7 +92,7 @@
max_depth
);
- 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) {
@@ -103,8 +105,15 @@
},
},
json_syck => {
- encoder => 'Dump',
- decoder => 'Load',
+ encoder => 'Dump',
+ decoder => 'Load',
+ create_object => sub {
+ my ( $self, $conf ) = @_;
+ croak "JSON::Syck does not support utf8" if $conf->{utf8};
+ $self->[ENCODER] = sub { Dump(@_) };
+ $self->[DECODER] = sub { Load(@_) };
+ $self->[HANDLER] = 'JSON::Syck';
+ }
},
);
@@ -297,11 +306,15 @@
$method = $self->[ENCODER];
}
$json = $self->[HANDLER]->$method($obj);
- } else {
+ }
+ else {
$json = $handler->can($encoder)->($obj);
}
- utf8::decode($json) if (ref $self ? $self->[UTF8] : $UTF8 ) and !utf8::is_utf8($json) and utf8::valid($json);
+ utf8::decode($json)
+ if ( ref $self ? $self->[UTF8] : $UTF8 )
+ and !utf8::is_utf8($json)
+ and utf8::valid($json);
return $json;
}
More information about the Pkg-perl-cvs-commits
mailing list