Skip to content

Commit fc5d2b7

Browse files
committed
Update backportPP with JSON::PP 4.10
1 parent ab73b27 commit fc5d2b7

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

lib/JSON/backportPP.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use JSON::backportPP::Boolean;
1515
use Carp ();
1616
#use Devel::Peek;
1717

18-
$JSON::backportPP::VERSION = '4.09';
18+
$JSON::backportPP::VERSION = '4.10';
1919

2020
@JSON::PP::EXPORT = qw(encode_json decode_json from_json to_json);
2121

@@ -1310,7 +1310,7 @@ BEGIN {
13101310
}
13111311

13121312
for my $c ( unpack( $type, $str ) ) { # emulate pv_uni_display() ?
1313-
my $chr_c = $c;
1313+
my $chr_c = chr($c);
13141314
$mess .= $chr_c eq '\\' ? '\\\\'
13151315
: $chr_c =~ /[[:print:]]/ ? $chr_c
13161316
: $chr_c eq '\a' ? '\a'

lib/JSON/backportPP/Boolean.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ overload::import('overload',
1111
fallback => 1,
1212
);
1313

14-
$JSON::backportPP::Boolean::VERSION = '4.09';
14+
$JSON::backportPP::Boolean::VERSION = '4.10';
1515

1616
1;
1717

t/04_dwiw_encode.t

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77

88
use strict;
99
use warnings;
10-
use Test;
10+
use Test::More tests => 5;
1111

1212
# main
1313
{
14-
BEGIN { plan tests => 5 }
15-
1614
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
1715

1816
use JSON;

t/05_dwiw_decode.t

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77

88
use strict;
99
use warnings;
10-
use Test;
10+
use Test::More tests => 7;
1111

1212
# main
1313
{
14-
BEGIN { plan tests => 7 }
15-
1614
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
1715

1816
use JSON;

t/108_decode.t

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use Test::More;
77

8-
BEGIN { plan tests => 6 };
8+
BEGIN { plan tests => 7 };
99

1010
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }
1111

@@ -41,3 +41,6 @@ utf8::encode($utf8); # UTF-8 flagged off
4141

4242
is($utf8, ($isASCII) ? "\xf0\x92\x90\x80" : "\xDE\x4A\x41\x41");
4343

44+
eval { $json->decode(q|{"action":"foo" "method":"bar","tid":1}|) };
45+
my $error = $@;
46+
like $error => qr!""method":"bar","tid"..."!;

0 commit comments

Comments
 (0)