diff --git a/bin/pgbackrest b/bin/pgbackrest index f443133ee..c2f9517c4 100755 --- a/bin/pgbackrest +++ b/bin/pgbackrest @@ -17,6 +17,7 @@ $SIG{__DIE__} = sub { Carp::confess @_ }; use File::Basename qw(dirname); use lib dirname($0) . '/../lib'; + use pgBackRest::Archive; use pgBackRest::Common::Exception; use pgBackRest::Common::Exit; diff --git a/doc/doc.pl b/doc/doc.pl index 44e2401c9..41c473fc1 100755 --- a/doc/doc.pl +++ b/doc/doc.pl @@ -20,6 +20,9 @@ use Pod::Usage qw(pod2usage); use Storable; use lib dirname($0) . '/lib'; +use lib dirname($0) . '/../lib'; +use lib dirname($0) . '/../test/lib'; + use BackRestDoc::Common::Doc; use BackRestDoc::Common::DocConfig; use BackRestDoc::Common::DocManifest; @@ -28,7 +31,6 @@ use BackRestDoc::Html::DocHtmlSite; use BackRestDoc::Latex::DocLatex; use BackRestDoc::Markdown::DocMarkdown; -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/doc/lib/BackRestDoc/Common/Doc.pm b/doc/lib/BackRestDoc/Common/Doc.pm index 2001ad366..8cd6ad481 100644 --- a/doc/lib/BackRestDoc/Common/Doc.pm +++ b/doc/lib/BackRestDoc/Common/Doc.pm @@ -12,7 +12,6 @@ use File::Basename qw(dirname); use Scalar::Util qw(blessed); use XML::Checker::Parser; -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; diff --git a/doc/lib/BackRestDoc/Html/DocHtmlSite.pm b/doc/lib/BackRestDoc/Html/DocHtmlSite.pm index 4a4fbc6af..a5e8d0b81 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlSite.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlSite.pm @@ -16,14 +16,12 @@ use File::Copy; use POSIX qw(strftime); use Storable qw(dclone); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; use pgBackRest::Version; -use lib dirname($0) . '/../test/lib'; use pgBackRestTest::Common::ExecuteTest; use BackRestDoc::Common::DocConfig; diff --git a/doc/lib/BackRestDoc/Latex/DocLatex.pm b/doc/lib/BackRestDoc/Latex/DocLatex.pm index a08a5fe02..dbc39f46e 100644 --- a/doc/lib/BackRestDoc/Latex/DocLatex.pm +++ b/doc/lib/BackRestDoc/Latex/DocLatex.pm @@ -16,14 +16,12 @@ use File::Copy; use POSIX qw(strftime); use Storable qw(dclone); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; use pgBackRest::Version; -use lib dirname($0) . '/../test/lib'; use pgBackRestTest::Common::ExecuteTest; use BackRestDoc::Common::DocConfig; diff --git a/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm b/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm index 843ad502e..0893ee3d4 100644 --- a/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm +++ b/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm @@ -15,13 +15,11 @@ use File::Copy; use POSIX qw(strftime); use Storable qw(dclone); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; use pgBackRest::Version; -use lib dirname($0) . '/../test/lib'; use pgBackRestTest::Common::ExecuteTest; use BackRestDoc::Common::DocConfig; diff --git a/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm b/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm index 9f14a4ffd..180d1d9c6 100644 --- a/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm +++ b/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm @@ -15,7 +15,6 @@ use File::Basename qw(dirname); use File::Copy; use Storable qw(dclone); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::Config::ConfigHelp; diff --git a/doc/release.pl b/doc/release.pl index 16218fe6f..9cce2e05f 100755 --- a/doc/release.pl +++ b/doc/release.pl @@ -20,6 +20,9 @@ use Pod::Usage qw(pod2usage); use Storable; use lib dirname($0) . '/lib'; +use lib dirname($0) . '/../lib'; +use lib dirname($0) . '/../test/lib'; + use BackRestDoc::Common::Doc; use BackRestDoc::Common::DocConfig; use BackRestDoc::Common::DocManifest; @@ -28,7 +31,6 @@ use BackRestDoc::Html::DocHtmlSite; use BackRestDoc::Latex::DocLatex; use BackRestDoc::Markdown::DocMarkdown; -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; @@ -36,7 +38,6 @@ use pgBackRest::Config::Config; use pgBackRest::FileCommon; use pgBackRest::Version; -use lib dirname($0) . '/../test/lib'; use pgBackRestTest::Common::ExecuteTest; #################################################################################################################################### diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 1aadb92c2..2e3bd92e7 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -57,6 +57,11 @@ sfrost + + Devrim Gündüz + devrimgunduz + + John Harvey crunchyjohn @@ -125,7 +130,7 @@ - + @@ -133,6 +138,16 @@

Added the stanza-create command to formalize creation of stanzas in the repository.

+
+ + + + + + + +

Removed extraneous use lib directives from Perl modules.

+
diff --git a/lib/pgBackRest/Archive.pm b/lib/pgBackRest/Archive.pm index d6ac4c465..a1671dd48 100644 --- a/lib/pgBackRest/Archive.pm +++ b/lib/pgBackRest/Archive.pm @@ -14,7 +14,6 @@ use Fcntl qw(SEEK_CUR O_RDONLY O_WRONLY O_CREAT); use File::Basename qw(dirname basename); use Scalar::Util qw(blessed); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Lock; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/ArchiveInfo.pm b/lib/pgBackRest/ArchiveInfo.pm index 2ba85c265..09fbacc88 100644 --- a/lib/pgBackRest/ArchiveInfo.pm +++ b/lib/pgBackRest/ArchiveInfo.pm @@ -16,7 +16,6 @@ use Exporter qw(import); use File::Basename qw(dirname basename); use File::stat; -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Backup.pm b/lib/pgBackRest/Backup.pm index 66e2a8eb6..d6c4ffbd3 100644 --- a/lib/pgBackRest/Backup.pm +++ b/lib/pgBackRest/Backup.pm @@ -13,7 +13,6 @@ use Fcntl 'SEEK_CUR'; use File::Basename; use File::Path qw(remove_tree); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Exit; use pgBackRest::Common::Ini; diff --git a/lib/pgBackRest/BackupCommon.pm b/lib/pgBackRest/BackupCommon.pm index f20855ab4..110b5d4ec 100644 --- a/lib/pgBackRest/BackupCommon.pm +++ b/lib/pgBackRest/BackupCommon.pm @@ -11,7 +11,6 @@ use Exporter qw(import); our @EXPORT = qw(); use File::Basename; -use lib dirname($0); use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::Config::Config; diff --git a/lib/pgBackRest/BackupFile.pm b/lib/pgBackRest/BackupFile.pm index d684c5cea..760537cfc 100644 --- a/lib/pgBackRest/BackupFile.pm +++ b/lib/pgBackRest/BackupFile.pm @@ -11,7 +11,6 @@ use Exporter qw(import); our @EXPORT = qw(); use File::Basename qw(dirname); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/BackupInfo.pm b/lib/pgBackRest/BackupInfo.pm index a86fc18b5..6622d33ae 100644 --- a/lib/pgBackRest/BackupInfo.pm +++ b/lib/pgBackRest/BackupInfo.pm @@ -13,7 +13,6 @@ use Exporter qw(import); use File::Basename qw(dirname basename); use File::stat; -use lib dirname($0); use pgBackRest::BackupCommon; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; diff --git a/lib/pgBackRest/Common/Exit.pm b/lib/pgBackRest/Common/Exit.pm index d7f3b1088..24f9bb750 100644 --- a/lib/pgBackRest/Common/Exit.pm +++ b/lib/pgBackRest/Common/Exit.pm @@ -12,7 +12,6 @@ use Exporter qw(import); our @EXPORT = qw(); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Lock; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Common/Ini.pm b/lib/pgBackRest/Common/Ini.pm index fa06d72a4..43f8bf184 100644 --- a/lib/pgBackRest/Common/Ini.pm +++ b/lib/pgBackRest/Common/Ini.pm @@ -15,7 +15,6 @@ use IO::Handle; use JSON::PP; use Storable qw(dclone); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/Common/Lock.pm b/lib/pgBackRest/Common/Lock.pm index a61fb8899..cdb5cc238 100644 --- a/lib/pgBackRest/Common/Lock.pm +++ b/lib/pgBackRest/Common/Lock.pm @@ -12,7 +12,6 @@ use Exporter qw(import); use Fcntl qw(:DEFAULT :flock); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/Common/Log.pm b/lib/pgBackRest/Common/Log.pm index 05e3cfb8b..9d5cedb2a 100644 --- a/lib/pgBackRest/Common/Log.pm +++ b/lib/pgBackRest/Common/Log.pm @@ -14,7 +14,6 @@ use File::Basename qw(dirname); use Scalar::Util qw(blessed reftype); use Time::HiRes qw(gettimeofday usleep); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/Common/Wait.pm b/lib/pgBackRest/Common/Wait.pm index 8986e1772..246695333 100644 --- a/lib/pgBackRest/Common/Wait.pm +++ b/lib/pgBackRest/Common/Wait.pm @@ -13,7 +13,6 @@ use File::Basename qw(dirname); use POSIX qw(ceil); use Time::HiRes qw(gettimeofday usleep); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; #################################################################################################################################### diff --git a/lib/pgBackRest/Config/Config.pm b/lib/pgBackRest/Config/Config.pm index 9ad9e9307..3832569ef 100644 --- a/lib/pgBackRest/Config/Config.pm +++ b/lib/pgBackRest/Config/Config.pm @@ -14,7 +14,6 @@ use File::Basename qw(dirname basename); use Getopt::Long qw(GetOptions); use Storable qw(dclone); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Config/ConfigHelp.pm b/lib/pgBackRest/Config/ConfigHelp.pm index 56b88940f..d32e870ff 100644 --- a/lib/pgBackRest/Config/ConfigHelp.pm +++ b/lib/pgBackRest/Config/ConfigHelp.pm @@ -11,7 +11,6 @@ use Exporter qw(import); our @EXPORT = qw(); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Db.pm b/lib/pgBackRest/Db.pm index 45ffb3650..52cf1e59b 100644 --- a/lib/pgBackRest/Db.pm +++ b/lib/pgBackRest/Db.pm @@ -14,7 +14,6 @@ use Exporter qw(import); use Fcntl qw(O_RDONLY); use File::Basename qw(dirname); -use lib dirname($0); use pgBackRest::DbVersion; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Expire.pm b/lib/pgBackRest/Expire.pm index 4e141f14f..5bc1a1810 100644 --- a/lib/pgBackRest/Expire.pm +++ b/lib/pgBackRest/Expire.pm @@ -12,7 +12,6 @@ use File::Basename qw(dirname); use File::Path qw(remove_tree); use Scalar::Util qw(looks_like_number); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::BackupCommon; diff --git a/lib/pgBackRest/File.pm b/lib/pgBackRest/File.pm index f8c97d741..19dfffcf8 100644 --- a/lib/pgBackRest/File.pm +++ b/lib/pgBackRest/File.pm @@ -17,7 +17,6 @@ use File::Path qw(make_path remove_tree); use File::stat; use IO::Handle; -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/FileCommon.pm b/lib/pgBackRest/FileCommon.pm index 00790e4f5..bc64fc287 100644 --- a/lib/pgBackRest/FileCommon.pm +++ b/lib/pgBackRest/FileCommon.pm @@ -16,7 +16,6 @@ use File::Path qw(make_path); use File::stat; use IO::Handle; -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Info.pm b/lib/pgBackRest/Info.pm index a991aa7ba..20fd1d502 100644 --- a/lib/pgBackRest/Info.pm +++ b/lib/pgBackRest/Info.pm @@ -11,7 +11,6 @@ use Exporter qw(import); our @EXPORT = qw(); use File::Basename qw(dirname); -use lib dirname($0); use pgBackRest::Common::Log; use pgBackRest::Common::Ini; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/Manifest.pm b/lib/pgBackRest/Manifest.pm index 92c1a1872..21deba818 100644 --- a/lib/pgBackRest/Manifest.pm +++ b/lib/pgBackRest/Manifest.pm @@ -14,7 +14,6 @@ use File::Basename qw(dirname basename); use Digest::SHA; use Time::Local qw(timelocal); -use lib dirname($0); use pgBackRest::DbVersion; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; diff --git a/lib/pgBackRest/Protocol/Common.pm b/lib/pgBackRest/Protocol/Common.pm index b5ceaae4f..ae9941fef 100644 --- a/lib/pgBackRest/Protocol/Common.pm +++ b/lib/pgBackRest/Protocol/Common.pm @@ -12,7 +12,6 @@ use Exporter qw(import); use Compress::Raw::Zlib qw(WANT_GZIP Z_OK Z_BUF_ERROR Z_STREAM_END); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Protocol/CommonMaster.pm b/lib/pgBackRest/Protocol/CommonMaster.pm index e63dd7cc2..ba57be72e 100644 --- a/lib/pgBackRest/Protocol/CommonMaster.pm +++ b/lib/pgBackRest/Protocol/CommonMaster.pm @@ -12,7 +12,6 @@ use English '-no_match_vars'; use File::Basename qw(dirname); use Time::HiRes qw(gettimeofday); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/Protocol/IO.pm b/lib/pgBackRest/Protocol/IO.pm index a7d4f3722..35f8ab65b 100644 --- a/lib/pgBackRest/Protocol/IO.pm +++ b/lib/pgBackRest/Protocol/IO.pm @@ -17,7 +17,6 @@ use POSIX qw(:sys_wait_h); use Symbol 'gensym'; use Time::HiRes qw(gettimeofday); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/lib/pgBackRest/Protocol/RemoteMaster.pm b/lib/pgBackRest/Protocol/RemoteMaster.pm index 902818a7d..d6a7b1dbd 100644 --- a/lib/pgBackRest/Protocol/RemoteMaster.pm +++ b/lib/pgBackRest/Protocol/RemoteMaster.pm @@ -10,7 +10,6 @@ use Carp qw(confess); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; use pgBackRest::Config::Config; use pgBackRest::Protocol::CommonMaster; diff --git a/lib/pgBackRest/Protocol/RemoteMinion.pm b/lib/pgBackRest/Protocol/RemoteMinion.pm index f90bdb9b6..7807ef202 100644 --- a/lib/pgBackRest/Protocol/RemoteMinion.pm +++ b/lib/pgBackRest/Protocol/RemoteMinion.pm @@ -10,7 +10,6 @@ use Carp qw(confess); use File::Basename qw(dirname); -use lib dirname($0) . '/../lib'; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Archive; diff --git a/lib/pgBackRest/Restore.pm b/lib/pgBackRest/Restore.pm index 618de87e5..794ae7f35 100644 --- a/lib/pgBackRest/Restore.pm +++ b/lib/pgBackRest/Restore.pm @@ -11,7 +11,6 @@ use Cwd qw(abs_path); use File::Basename qw(basename dirname); use File::stat qw(lstat); -use lib dirname($0); use pgBackRest::BackupInfo; use pgBackRest::Common::Exception; use pgBackRest::Common::Log; diff --git a/lib/pgBackRest/RestoreFile.pm b/lib/pgBackRest/RestoreFile.pm index 631f269bd..c279e0cb6 100644 --- a/lib/pgBackRest/RestoreFile.pm +++ b/lib/pgBackRest/RestoreFile.pm @@ -13,7 +13,6 @@ use Fcntl qw(O_WRONLY O_CREAT O_TRUNC); use File::Basename qw(dirname); use File::stat qw(lstat); -use lib dirname($0); use pgBackRest::Common::Exception; use pgBackRest::Common::Log; use pgBackRest::Common::String; diff --git a/test/test.pl b/test/test.pl index 6fa80a1c9..2e3ae2382 100755 --- a/test/test.pl +++ b/test/test.pl @@ -21,7 +21,10 @@ use Pod::Usage qw(pod2usage); use POSIX qw(ceil); use Time::HiRes qw(gettimeofday); +use lib dirname($0) . '/lib'; use lib dirname($0) . '/../lib'; +use lib dirname($0) . '/../doc/lib'; + use pgBackRest::Common::Exception; use pgBackRest::Common::Ini; use pgBackRest::Common::Log; @@ -32,10 +35,8 @@ use pgBackRest::DbVersion; use pgBackRest::FileCommon; use pgBackRest::Version; -use lib dirname($0) . '/../doc/lib'; use BackRestDoc::Custom::DocCustomRelease; -use lib dirname($0) . '/lib'; use pgBackRestTest::Backup::BackupTest; use pgBackRestTest::Backup::Common::HostBackupTest; use pgBackRestTest::Backup::Common::HostBaseTest; @@ -219,7 +220,6 @@ eval if (!defined($iVmId)) { # Load the doc module dynamically since it is not supported on all systems - use lib dirname(abs_path($0)) . '/../doc/lib'; require BackRestDoc::Common::Doc; BackRestDoc::Common::Doc->import();