From bc156f8ee9d8c500bc97d87b99c1ff2f530b213d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Mon, 1 Apr 2013 21:48:45 -0700 Subject: [PATCH] Released version 0.29 --- Changes | 5 +++++ Makefile.PL | 2 +- README | 2 +- lib/boolean.pm | 6 +++--- t/json.t | 6 ++++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index 8c22401..8e0e621 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,9 @@ --- +version: 0.29 +date: Mon Apr 1 21:48:31 PDT 2013 +changes: +- Support JSON and JSON::XS. dankogai-san++ +--- version: 0.28 date: Mon Sep 12 13:51:47 CEST 2011 changes: diff --git a/Makefile.PL b/Makefile.PL index b53cf6d..796c2f6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,3 +1,3 @@ -use inc::Module::Package 'Ingy:modern 0.15'; +use inc::Module::Package 'Ingy:modern 0.20'; recommends 'Readonly'; diff --git a/README b/README index 2390458..1e9a674 100644 --- a/README +++ b/README @@ -121,7 +121,7 @@ AUTHOR Ingy döt Net COPYRIGHT - Copyright (c) 2007, 2008, 2010, 2011. Ingy döt Net. + Copyright (c) 2007, 2008, 2010, 2011, 2013. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/boolean.pm b/lib/boolean.pm index b93b16e..612d714 100644 --- a/lib/boolean.pm +++ b/lib/boolean.pm @@ -2,7 +2,7 @@ use 5.005003; package boolean; use strict; -$boolean::VERSION = '0.28'; +$boolean::VERSION = '0.29'; my ($true, $false); @@ -79,7 +79,7 @@ sub truth { &Internals::SvREADONLY( \ !!1, 1); } -sub TO_JSON() { ${$_[0]} ? \1 : \ 0 } +sub TO_JSON() { ${$_[0]} ? \1 : \0 } 1; @@ -236,7 +236,7 @@ Ingy döt Net =head1 COPYRIGHT -Copyright (c) 2007, 2008, 2010, 2011. Ingy döt Net. +Copyright (c) 2007, 2008, 2010, 2011, 2013. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/t/json.t b/t/json.t index 8b62176..7930859 100644 --- a/t/json.t +++ b/t/json.t @@ -5,7 +5,9 @@ SKIP: { skip "JSON is missing", 2 unless $HAVE_JSON; eval{ my $json = JSON->new->convert_blessed(); - is($json->encode({false => (0 == 1)}), '{"false":false}'); - is($json->encode({true => (1 == 1)}), '{"true":true}'); + is($json->encode({false => (0 == 1)}), '{"false":false}', + 'JSON false works'); + is($json->encode({true => (1 == 1)}), '{"true":true}', + 'JSON true works'); } };