TT#17650 Switch to use YAML::XS instead of YAML::Tiny

The latter does not support YAML 1.1, nor many parts of the
specification. Use the more compliant implementation, in addition to try
to converge to a single one, so that we do not get serialization delta
surprises.

Change-Id: Ia3f6808b9bb84afb224cc29040964eefe07bf118
changes/25/13925/1
Guillem Jover 8 years ago
parent 1a874d1d17
commit 11f83b0044

@ -33,7 +33,6 @@ my $builder = Module::Build->new(
'Data::Validate::IP' => 0, 'Data::Validate::IP' => 0,
'Config::Any' => 0, 'Config::Any' => 0,
'YAML::Tiny' => 0,
'Log::Log4Perl' => 0, 'Log::Log4Perl' => 0,
'MIME::Base64' => 0, 'MIME::Base64' => 0,
'MIME::Lite' => 0, 'MIME::Lite' => 0,

1
debian/control vendored

@ -60,7 +60,6 @@ Depends:
libxml-dumper-perl, libxml-dumper-perl,
libxml-libxml-perl, libxml-libxml-perl,
libyaml-libyaml-perl, libyaml-libyaml-perl,
libyaml-tiny-perl,
perl, perl,
${misc:Depends}, ${misc:Depends},
${perl:Depends}, ${perl:Depends},

@ -28,7 +28,7 @@ use NGCP::BulkProcessor::LogError qw(
configurationerror configurationerror
); );
use YAML::Tiny qw(); use YAML::XS qw();
use Config::Any qw(); use Config::Any qw();
use NGCP::BulkProcessor::Utils qw(format_number trim); use NGCP::BulkProcessor::Utils qw(format_number trim);
@ -254,7 +254,7 @@ sub _parse_yaml_config {
my $config = undef; my $config = undef;
eval { eval {
$config = YAML::Tiny->read($file); $config = YAML::XS::LoadFile($file);
}; };
if ($@) { if ($@) {
configurationerror($file,'parsing yaml format - error: ' . $@,getlogger(__PACKAGE__)); configurationerror($file,'parsing yaml format - error: ' . $@,getlogger(__PACKAGE__));

Loading…
Cancel
Save