1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-04 03:49:14 +02:00

Use YAML::Any module instead of YAML::XS in Perl.

YAML::XS requires libyaml so it not as portable as pure Perl versions of YAML.

Instead of using YAML:PP just use the general YAML::Any module which uses whatever is installed. We are not concerned about performance for YAML so whatever works is fine.
This commit is contained in:
David Steele 2021-01-24 15:06:38 -05:00
parent ea0dc8c2cb
commit d2057c53bd
7 changed files with 11 additions and 11 deletions

View File

@ -31,8 +31,8 @@ sub errorDefineLoad
{
my $strErrorYaml = shift;
require YAML::XS;
YAML::XS->import(qw(Load));
require YAML::Any;
YAML::Any->import(qw(Load));
$rhErrorDefine = Load($strErrorYaml);
}

View File

@ -69,7 +69,7 @@
<exe-cmd>
apt-get install rsync git devscripts build-essential valgrind lcov autoconf
autoconf-archive libssl-dev zlib1g-dev libxml2-dev libpq-dev pkg-config
libxml-checker-perl libyaml-libyaml-perl libdbd-pg-perl liblz4-dev liblz4-tool
libxml-checker-perl libyaml-perl libdbd-pg-perl liblz4-dev liblz4-tool
zstd libzstd-dev bzip2 libbz2-dev
</exe-cmd>
<exe-cmd-extra>-y 2>&amp;1</exe-cmd-extra>

2
test/Vagrantfile vendored
View File

@ -70,7 +70,7 @@ Vagrant.configure(2) do |config|
#-----------------------------------------------------------------------------------------------------------------------
echo 'Install Perl Modules' && date
apt-get install -y libdbd-pg-perl libxml-checker-perl libyaml-libyaml-perl
apt-get install -y libdbd-pg-perl libxml-checker-perl libyaml-perl
#-----------------------------------------------------------------------------------------------------------------------
echo 'Install Build Tools' && date

View File

@ -133,7 +133,7 @@ eval
processBegin('install common packages');
processExec('sudo apt-get -qq update', {bSuppressStdErr => true, bSuppressError => true});
processExec('sudo apt-get install -y libxml-checker-perl libyaml-libyaml-perl', {bSuppressStdErr => true});
processExec('sudo apt-get install -y libxml-checker-perl libyaml-perl', {bSuppressStdErr => true});
processEnd();
processBegin('mount tmpfs');

View File

@ -27,8 +27,8 @@ sub codeCountScan
my $strBasePath = shift;
# Load YAML
require YAML::XS;
YAML::XS->import(qw(Load Dump));
require YAML::Any;
YAML::Any->import(qw(Load Dump));
my $hCodeCount = {};

View File

@ -301,8 +301,8 @@ sub containerBuild
$oStorageDocker->pathCreate($strTempPath, {strMode => '0770', bIgnoreExists => true, bCreateParent => true});
# Load container definitions from yaml
require YAML::XS;
YAML::XS->import(qw(Load));
require YAML::Any;
YAML::Any->import(qw(Load));
$hContainerCache = Load(${$oStorageDocker->get($oStorageDocker->pathGet('test/container.yaml'))});

View File

@ -87,8 +87,8 @@ sub testDefLoad
my $strDefineYaml = shift;
# Load test definitions from yaml
require YAML::XS;
YAML::XS->import(qw(Load));
require YAML::Any;
YAML::Any->import(qw(Load));
my $hTestDef = Load($strDefineYaml);