1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-12-03 22:39:18 +02:00

Remove function constants and pass strings directly to logDebugParam().

The function names were only used once so creating constants for them was wasteful.
This commit is contained in:
David Steele
2016-05-26 09:09:42 -04:00
parent e7d4a25d6a
commit e2094c3d31
13 changed files with 61 additions and 199 deletions

View File

@@ -18,16 +18,6 @@ use pgBackRest::Config::Config;
use pgBackRest::Config::ConfigHelp;
use pgBackRest::FileCommon;
####################################################################################################################################
# Operation constants
####################################################################################################################################
use constant OP_DOC_CONFIG => 'DocConfig';
use constant OP_DOC_CONFIG_NEW => OP_DOC_CONFIG . '->new';
use constant OP_DOC_CONFIG_PROCESS => OP_DOC_CONFIG . '->process';
use constant OP_DOC_CONFIG_HELP_DATA_WRITE => OP_DOC_CONFIG . '->helpDataWrite';
use constant OP_DOC_CONFIG_HELP_CONFIG_DOC_GET => OP_DOC_CONFIG . '->helpConfigDocGet';
####################################################################################################################################
# Help types
####################################################################################################################################
@@ -53,7 +43,7 @@ sub new
) =
logDebugParam
(
OP_DOC_CONFIG_NEW, \@_,
__PACKAGE__ . '->new', \@_,
{name => 'oDoc'},
{name => 'oDocRender'}
);
@@ -78,7 +68,7 @@ sub process
my $self = shift;
# Assign function parameters, defaults, and log debug info
my $strOperation = logDebugParam(OP_DOC_CONFIG_PROCESS);
my $strOperation = logDebugParam(__PACKAGE__ . '->process');
# Iterate through all commands
my $oDoc = $self->{oDoc};
@@ -249,7 +239,7 @@ sub helpDataWrite
) =
logDebugParam
(
OP_DOC_CONFIG_HELP_DATA_WRITE, \@_,
__PACKAGE__ . '->helpDataWrite', \@_,
{name => 'oManifest'}
);
@@ -499,7 +489,7 @@ sub helpConfigDocGet
my $self = shift;
# Assign function parameters, defaults, and log debug info
my $strOperation = logDebugParam(OP_DOC_CONFIG_HELP_CONFIG_DOC_GET);
my $strOperation = logDebugParam(__PACKAGE__ . '->helpConfigDocGet');
# Build a hash of the sections
my $oConfigHash = $self->{oConfigHash};
@@ -562,7 +552,7 @@ sub helpCommandDocGet
my $self = shift;
# Assign function parameters, defaults, and log debug info
my $strOperation = logDebugParam(OP_DOC_CONFIG_HELP_CONFIG_DOC_GET);
my $strOperation = logDebugParam(__PACKAGE__ . '->helpCommandDocGet');
# Working variables
my $oConfigHash = $self->{oConfigHash};