r39325 - in /trunk/libjson-any-perl: Changes MANIFEST META.yml debian/changelog debian/control lib/JSON/Any.pm t/12-boolean.t
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sat Jul 4 08:53:12 UTC 2009
Author: ansgar-guest
Date: Sat Jul 4 08:53:06 2009
New Revision: 39325
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=39325
Log:
Update for 1.21
Added:
trunk/libjson-any-perl/t/12-boolean.t
- copied unchanged from r39324, branches/upstream/libjson-any-perl/current/t/12-boolean.t
Modified:
trunk/libjson-any-perl/Changes
trunk/libjson-any-perl/MANIFEST
trunk/libjson-any-perl/META.yml
trunk/libjson-any-perl/debian/changelog
trunk/libjson-any-perl/debian/control
trunk/libjson-any-perl/lib/JSON/Any.pm
Modified: trunk/libjson-any-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/Changes?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/Changes (original)
+++ trunk/libjson-any-perl/Changes Sat Jul 4 08:53:06 2009
@@ -1,4 +1,8 @@
Revision history for JSON-Any
+1.21 2009-07-03
+ * Update JSON::XS boolean support; it provides true/false methods (semifor)
+ * Added a workaround for handlers that fail to decode bare true/false values (semifor)
+
1.20 2009-07-02
* Re-work things so that deprecated modules just warn but aren't actually excluded (perigrin)
* Improve the warnings when things go awry (semifor)
Modified: trunk/libjson-any-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/MANIFEST?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/MANIFEST (original)
+++ trunk/libjson-any-perl/MANIFEST Sat Jul 4 08:53:06 2009
@@ -25,3 +25,4 @@
t/05-JSON-Syck.t
t/10_unicode.t
t/11-string-escape.t
+t/12-boolean.t
Modified: trunk/libjson-any-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/META.yml?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/META.yml (original)
+++ trunk/libjson-any-perl/META.yml Sat Jul 4 08:53:06 2009
@@ -22,4 +22,4 @@
Carp: 0
resources:
license: http://dev.perl.org/licenses/
-version: 1.20
+version: 1.21
Modified: trunk/libjson-any-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/debian/changelog?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/debian/changelog (original)
+++ trunk/libjson-any-perl/debian/changelog Sat Jul 4 08:53:06 2009
@@ -1,14 +1,15 @@
-libjson-any-perl (1.20-1) unstable; urgency=low
+libjson-any-perl (1.21-1) unstable; urgency=low
[ Nathan Handler ]
* debian/watch: Update to ignore development releases.
[ Ansgar Burchardt ]
* New upstream release.
+ * Depend on debhelper (>= 7.2.13) because we use Module::Install.
* Use minimal debian/rules.
* Set Standards-Version to 3.8.2 (no changes).
- -- Ansgar Burchardt <ansgar at 43-1.org> Fri, 03 Jul 2009 18:52:45 +0200
+ -- Ansgar Burchardt <ansgar at 43-1.org> Sat, 04 Jul 2009 10:52:02 +0200
libjson-any-perl (1.19-1) unstable; urgency=low
Modified: trunk/libjson-any-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/debian/control?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/debian/control (original)
+++ trunk/libjson-any-perl/debian/control Sat Jul 4 08:53:06 2009
@@ -1,7 +1,7 @@
Source: libjson-any-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7)
+Build-Depends: debhelper (>= 7.2.13)
Build-Depends-Indep: perl (>= 5.8.8-7), libjson-perl (>= 2.02),
libyaml-syck-perl, libtest-pod-perl, libtest-pod-coverage-perl, libjson-xs-perl (>= 2.01)
Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
Modified: trunk/libjson-any-perl/lib/JSON/Any.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjson-any-perl/lib/JSON/Any.pm?rev=39325&op=diff
==============================================================================
--- trunk/libjson-any-perl/lib/JSON/Any.pm (original)
+++ trunk/libjson-any-perl/lib/JSON/Any.pm Sat Jul 4 08:53:06 2009
@@ -10,11 +10,11 @@
=head1 VERSION
-Version 1.20
-
-=cut
-
-our $VERSION = '1.20';
+Version 1.21
+
+=cut
+
+our $VERSION = '1.21';
our $UTF8;
@@ -32,8 +32,6 @@
get_true => sub { return JSON::true(); },
get_false => sub { return JSON::false(); },
create_object => sub {
- require utf8;
- utf8->import();
JSON->import( '-support_by_pp', '-no_export' );
my ( $self, $conf ) = @_;
my @params = qw(
@@ -123,11 +121,9 @@
json_xs_2 => {
encoder => 'encode_json',
decoder => 'decode_json',
- get_true => sub { return \1; },
- get_false => sub { return \0; },
+ get_true => sub { return JSON::XS::true(); },
+ get_false => sub { return JSON::XS::false(); },
create_object => sub {
- require utf8;
- utf8->import();
my ( $self, $conf ) = @_;
my @params = qw(
@@ -512,6 +508,11 @@
my $obj = shift;
croak 'must provide json to convert' unless defined $obj;
+ # some handlers can't parse single booleans (I'm looking at you DWIW)
+ if ( $obj =~ /^(true|false)$/ ) {
+ return $self->$1;
+ }
+
if ( ref $self ) {
my $method;
unless ( ref $self->[DECODER] ) {
More information about the Pkg-perl-cvs-commits
mailing list