projects
/
liburi-template-perl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.17
[liburi-template-perl.git]
/
t
/
12-suite.t
diff --git
a/t/12-suite.t
b/t/12-suite.t
index
cbe2869
..
3a763be
100644
(file)
--- a/
t/12-suite.t
+++ b/
t/12-suite.t
@@
-7,6
+7,10
@@
use Scalar::Util ();
BEGIN {
eval "use JSON ();";
plan skip_all => "JSON required" if $@;
BEGIN {
eval "use JSON ();";
plan skip_all => "JSON required" if $@;
+
+ eval { JSON->VERSION( 2 ) };
+ plan skip_all => "JSON version 2 of greater required" if $@;
+
plan( 'no_plan' );
use_ok( 'URI::Template' );
}
plan( 'no_plan' );
use_ok( 'URI::Template' );
}
@@
-23,8
+27,7
@@
for my $file ( @files ) {
my $data = do { local $/; <$json> };
close( $json );
my $data = do { local $/; <$json> };
close( $json );
- eval { JSON->VERSION( 2 ) };
- my $suite = $@ ? JSON::jsonToObj( $data ) : JSON::from_json( $data );
+ my $suite = JSON->new->utf8( 1 )->decode( $data );
for my $name ( sort keys %$suite ) {
my $info = $suite->{ $name };
for my $name ( sort keys %$suite ) {
my $info = $suite->{ $name };