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:
parent
ea0dc8c2cb
commit
d2057c53bd
@ -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);
|
||||
}
|
||||
|
@ -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>&1</exe-cmd-extra>
|
||||
|
2
test/Vagrantfile
vendored
2
test/Vagrantfile
vendored
@ -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
|
||||
|
@ -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');
|
||||
|
@ -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 = {};
|
||||
|
||||
|
@ -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'))});
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user