You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-08-23 06:52:23 +03:00
Configuration rules are now pulled from the C library when present.
This commit is contained in:
39
lib/pgBackRest/LibCLoad.pm
Normal file
39
lib/pgBackRest/LibCLoad.pm
Normal file
@@ -0,0 +1,39 @@
|
||||
####################################################################################################################################
|
||||
# Determine if C Library is Present
|
||||
####################################################################################################################################
|
||||
package pgBackRest::LibCLoad;
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
use Carp qw(confess);
|
||||
|
||||
use Exporter qw(import);
|
||||
our @EXPORT = qw();
|
||||
|
||||
use pgBackRest::Common::Log;
|
||||
|
||||
####################################################################################################################################
|
||||
# Attempt to load the C Library
|
||||
####################################################################################################################################
|
||||
my $bLibC = false;
|
||||
|
||||
eval
|
||||
{
|
||||
# Attempt to load the C Library
|
||||
require pgBackRest::LibC;
|
||||
$bLibC = true;
|
||||
|
||||
return 1;
|
||||
} or do {};
|
||||
|
||||
####################################################################################################################################
|
||||
# libC - is the C library present?
|
||||
####################################################################################################################################
|
||||
sub libC
|
||||
{
|
||||
return $bLibC;
|
||||
}
|
||||
|
||||
push @EXPORT, qw(libC);
|
||||
|
||||
1;
|
Reference in New Issue
Block a user