File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ use strict;
2525use Build::SimpleJSON;
2626
2727eval { require YAML::XS; $YAML::XS::LoadBlessed = 0; };
28- my $jsonxs = eval { require JSON::XS; return 1 };
29-
3028*YAML::XS::LoadFile = sub {die (" YAML::XS is not available\n " )} unless defined &YAML::XS::LoadFile;
3129
3230sub verify_config {
@@ -111,17 +109,9 @@ sub show {
111109 die (" $fn : $! \n " ) unless open ($fd , ' <' , $fn );
112110 1 while sysread ($fd , $config_yaml , 8192, length ($config_yaml ));
113111 close ($fd );
114- local $YAML::XS::Boolean = " boolean" ;
115112 my $config = YAML::XS::Load($config_yaml );
116113 verify_config($config );
117- my $config_json ;
118- if ($jsonxs ) {
119- my $convert = JSON::XS-> new-> utf8-> canonical-> pretty;
120- $convert = $convert -> convert_blessed(1);
121- $config_json = $convert -> encode($config );
122- } else {
123- $config_json = Build::SimpleJSON::unparse($config )." \n " ;
124- }
114+ my $config_json = Build::SimpleJSON::unparse($config )." \n " ;
125115 my $helminfo = {};
126116 $helminfo -> {' name' } = $d -> {' name' };
127117 $helminfo -> {' version' } = $d -> {' version' };
You can’t perform that action at this time.
0 commit comments