From e2094c3d312a69544cd144e4758508c7966075b8 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 26 May 2016 09:09:42 -0400 Subject: [PATCH] Remove function constants and pass strings directly to logDebugParam(). The function names were only used once so creating constants for them was wasteful. --- doc/lib/BackRestDoc/Common/Doc.pm | 45 ++++++------------- doc/lib/BackRestDoc/Common/DocConfig.pm | 20 +++------ doc/lib/BackRestDoc/Common/DocExecute.pm | 21 +++------ doc/lib/BackRestDoc/Common/DocManifest.pm | 27 +++-------- doc/lib/BackRestDoc/Common/DocRender.pm | 21 +++------ doc/lib/BackRestDoc/Html/DocHtmlBuilder.pm | 15 ++----- doc/lib/BackRestDoc/Html/DocHtmlElement.pm | 15 ++----- doc/lib/BackRestDoc/Html/DocHtmlPage.pm | 21 +++------ doc/lib/BackRestDoc/Html/DocHtmlSite.pm | 12 +---- doc/lib/BackRestDoc/Latex/DocLatex.pm | 12 +---- doc/lib/BackRestDoc/Latex/DocLatexSection.pm | 18 ++------ doc/lib/BackRestDoc/Markdown/DocMarkdown.pm | 12 +---- .../BackRestDoc/Markdown/DocMarkdownRender.pm | 21 +++------ 13 files changed, 61 insertions(+), 199 deletions(-) diff --git a/doc/lib/BackRestDoc/Common/Doc.pm b/doc/lib/BackRestDoc/Common/Doc.pm index 466a56269..4cc0e9458 100644 --- a/doc/lib/BackRestDoc/Common/Doc.pm +++ b/doc/lib/BackRestDoc/Common/Doc.pm @@ -19,25 +19,6 @@ use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC => 'Doc'; - -use constant OP_DOC_BUILD => OP_DOC . '->build'; -use constant OP_DOC_NAME_GET => OP_DOC . '->nameGet'; -use constant OP_DOC_NEW => OP_DOC . '->new'; -use constant OP_DOC_NODE_BLESS => OP_DOC . '->nodeBless'; -use constant OP_DOC_NODE_GET => OP_DOC . '->nodeGet'; -use constant OP_DOC_NODE_LIST => OP_DOC . '->nodeList'; -use constant OP_DOC_NODE_REMOVE => OP_DOC . '->nodeRemove'; -use constant OP_DOC_PARAM_GET => OP_DOC . '->paramGet'; -use constant OP_DOC_PARAM_SET => OP_DOC . '->paramSet'; -use constant OP_DOC_PARAM_TEST => OP_DOC . '->paramSet'; -use constant OP_DOC_PARSE => OP_DOC . '->parse'; -use constant OP_DOC_VALUE_GET => OP_DOC . '->valueGet'; -use constant OP_DOC_VALUE_SET => OP_DOC . '->valueSet'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -59,7 +40,7 @@ sub new ) = logDebugParam ( - OP_DOC_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'strFileName', required => false}, {name => 'bCached', default => false} ); @@ -135,7 +116,7 @@ sub parse ) = logDebugParam ( - OP_DOC_PARSE, \@_, + __PACKAGE__ . '->parse', \@_, {name => 'strName', trace => true}, {name => 'oyNode', trace => true} ); @@ -240,7 +221,7 @@ sub build ) = logDebugParam ( - OP_DOC_BUILD, \@_, + __PACKAGE__ . '->build', \@_, {name => 'oDoc', trace => true} ); @@ -315,7 +296,7 @@ sub nodeGetById ) = logDebugParam ( - OP_DOC_NODE_GET, \@_, + __PACKAGE__ . 'nodeGetById', \@_, {name => 'strName', trace => true}, {name => 'strId', required => false, trace => true}, {name => 'bRequired', default => true, trace => true} @@ -415,7 +396,7 @@ sub nodeBless ) = logDebugParam ( - OP_DOC_NODE_BLESS, \@_, + __PACKAGE__ . '->nodeBless', \@_, {name => 'oNode', required => false, trace => true} ); @@ -457,7 +438,7 @@ sub nodeList ) = logDebugParam ( - OP_DOC_NODE_LIST, \@_, + __PACKAGE__ . '->nodeList', \@_, {name => 'strName', required => false, trace => true}, {name => 'bRequired', default => true, trace => true}, ); @@ -513,7 +494,7 @@ sub nodeRemove ) = logDebugParam ( - OP_DOC_NODE_REMOVE, \@_, + __PACKAGE__ . '->nodeRemove', \@_, {name => 'oChildRemove', required => false, trace => true} ); @@ -553,7 +534,7 @@ sub nameGet my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_NAME_GET); + my $strOperation = logDebugParam(__PACKAGE__ . '->nameGet'); # Return from function and log return values if any return logDebugReturn @@ -571,7 +552,7 @@ sub valueGet my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_VALUE_GET); + my $strOperation = logDebugParam(__PACKAGE__ . '->valueGet'); # Return from function and log return values if any return logDebugReturn @@ -590,7 +571,7 @@ sub valueSet my $strValue = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_VALUE_SET); + my $strOperation = logDebugParam(__PACKAGE__ . '->valueSet'); # Set the value ${$self->{oDoc}}{value} = $strValue; @@ -619,7 +600,7 @@ sub paramGet ) = logDebugParam ( - OP_DOC_PARAM_GET, \@_, + __PACKAGE__ . '->paramGet', \@_, {name => 'strName', trace => true}, {name => 'bRequired', default => true, trace => true}, {name => 'strDefault', required => false, trace => true}, @@ -665,7 +646,7 @@ sub paramTest ) = logDebugParam ( - OP_DOC_PARAM_TEST, \@_, + __PACKAGE__ . '->paramTest', \@_, {name => 'strName', trace => true}, {name => 'strExpectedValue', required => false, trace => true}, {name => 'strType', default => 'param', trace => true} @@ -710,7 +691,7 @@ sub paramSet ) = logDebugParam ( - OP_DOC_PARAM_SET, \@_, + __PACKAGE__ . '->paramSet', \@_, {name => 'strName', trace => true}, {name => 'strValue', required => false, trace => true}, {name => 'strType', default => 'param', trace => true} diff --git a/doc/lib/BackRestDoc/Common/DocConfig.pm b/doc/lib/BackRestDoc/Common/DocConfig.pm index bdefe7737..45dd5205a 100644 --- a/doc/lib/BackRestDoc/Common/DocConfig.pm +++ b/doc/lib/BackRestDoc/Common/DocConfig.pm @@ -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}; diff --git a/doc/lib/BackRestDoc/Common/DocExecute.pm b/doc/lib/BackRestDoc/Common/DocExecute.pm index 8927b430c..4dfc67013 100644 --- a/doc/lib/BackRestDoc/Common/DocExecute.pm +++ b/doc/lib/BackRestDoc/Common/DocExecute.pm @@ -26,17 +26,6 @@ use pgBackRestTest::Common::HostTest; use BackRestDoc::Common::DocManifest; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_EXECUTE => 'DocExecute'; - -use constant OP_DOC_EXECUTE_BACKREST_CONFIG => OP_DOC_EXECUTE . '->backrestConfig'; -use constant OP_DOC_EXECUTE_EXECUTE => OP_DOC_EXECUTE . '->execute'; -use constant OP_DOC_EXECUTE_NEW => OP_DOC_EXECUTE . '->new'; -use constant OP_DOC_EXECUTE_POSTGRES_CONFIG => OP_DOC_EXECUTE . '->postresConfig'; -use constant OP_DOC_EXECUTE_SECTION_CHILD_PROCESS => OP_DOC_EXECUTE . '->sectionChildProcess'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -55,7 +44,7 @@ sub new ) = logDebugParam ( - OP_DOC_EXECUTE_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'strType'}, {name => 'oManifest'}, {name => 'strRenderOutKey'}, @@ -94,7 +83,7 @@ sub execute ) = logDebugParam ( - OP_DOC_EXECUTE_EXECUTE, \@_, + __PACKAGE__ . '->execute', \@_, {name => 'oSection'}, {name => 'strHostName'}, {name => 'oCommand'}, @@ -301,7 +290,7 @@ sub backrestConfig ) = logDebugParam ( - OP_DOC_EXECUTE_BACKREST_CONFIG, \@_, + __PACKAGE__ . '->backrestConfig', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} @@ -449,7 +438,7 @@ sub postgresConfig ) = logDebugParam ( - OP_DOC_EXECUTE_POSTGRES_CONFIG, \@_, + __PACKAGE__ . '->postgresConfig', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} @@ -579,7 +568,7 @@ sub sectionChildProcess ) = logDebugParam ( - OP_DOC_EXECUTE_SECTION_CHILD_PROCESS, \@_, + __PACKAGE__ . '->sectionChildProcess', \@_, {name => 'oSection'}, {name => 'oChild'}, {name => 'iDepth'} diff --git a/doc/lib/BackRestDoc/Common/DocManifest.pm b/doc/lib/BackRestDoc/Common/DocManifest.pm index 5d89ccc43..b93452cb3 100644 --- a/doc/lib/BackRestDoc/Common/DocManifest.pm +++ b/doc/lib/BackRestDoc/Common/DocManifest.pm @@ -18,19 +18,6 @@ use pgBackRest::Common::Log; use pgBackRest::Common::String; use pgBackRest::FileCommon; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_MANIFEST => 'DocManifest'; - -use constant OP_DOC_MANIFEST_NEW => OP_DOC_MANIFEST . '->new'; -use constant OP_DOC_MANIFEST_RENDER_GET => OP_DOC_MANIFEST . '->renderGet'; -use constant OP_DOC_MANIFEST_RENDER_LIST => OP_DOC_MANIFEST . '->renderList'; -use constant OP_DOC_MANIFEST_RENDER_OUT_GET => OP_DOC_MANIFEST . '->renderOutGet'; -use constant OP_DOC_MANIFEST_RENDER_OUT_LIST => OP_DOC_MANIFEST . '->renderOutList'; -use constant OP_DOC_MANIFEST_SOURCE_GET => OP_DOC_MANIFEST . '->sourceGet'; -use constant OP_DOC_MANIFEST_VARIABLE_LIST_PARSE => OP_DOC_MANIFEST . '->variableListParse'; - #################################################################################################################################### # File constants #################################################################################################################################### @@ -71,7 +58,7 @@ sub new ) = logDebugParam ( - OP_DOC_MANIFEST_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'stryKeyword'}, {name => 'stryRequire'}, {name => 'oVariableOverride', required => false}, @@ -263,7 +250,7 @@ sub variableListParse ) = logDebugParam ( - OP_DOC_MANIFEST_VARIABLE_LIST_PARSE, \@_, + __PACKAGE__ . '->variableListParse', \@_, {name => '$oVariableList', required => false}, {name => '$oVariableOverride', required => false} ); @@ -415,7 +402,7 @@ sub sourceGet ) = logDebugParam ( - OP_DOC_MANIFEST_SOURCE_GET, \@_, + __PACKAGE__ . '->sourceGet', \@_, {name => 'strSource', trace => true} ); @@ -440,7 +427,7 @@ sub renderList my $self = shift; # Assign function parameters, defaults, and log debug info - my ($strOperation) = logDebugParam(OP_DOC_MANIFEST_RENDER_LIST); + my ($strOperation) = logDebugParam(__PACKAGE__ . '->renderList'); # Check that the render output exists my @stryRender; @@ -473,7 +460,7 @@ sub renderGet ) = logDebugParam ( - OP_DOC_MANIFEST_RENDER_GET, \@_, + __PACKAGE__ . '->renderGet', \@_, {name => 'strType', trace => true} ); @@ -506,7 +493,7 @@ sub renderOutList ) = logDebugParam ( - OP_DOC_MANIFEST_RENDER_OUT_LIST, \@_, + __PACKAGE__ . '->renderOutList', \@_, {name => 'strType'} ); @@ -542,7 +529,7 @@ sub renderOutGet ) = logDebugParam ( - OP_DOC_MANIFEST_RENDER_OUT_GET, \@_, + __PACKAGE__ . '->renderOutGet', \@_, {name => 'strType', trace => true}, {name => 'strKey', trace => true} ); diff --git a/doc/lib/BackRestDoc/Common/DocRender.pm b/doc/lib/BackRestDoc/Common/DocRender.pm index 6f0a65d67..88662ddd5 100644 --- a/doc/lib/BackRestDoc/Common/DocRender.pm +++ b/doc/lib/BackRestDoc/Common/DocRender.pm @@ -17,17 +17,6 @@ use pgBackRest::Common::String; use BackRestDoc::Common::DocManifest; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_RENDER => 'DocRender'; - -use constant OP_DOC_RENDER_PROCESS => OP_DOC_RENDER . '->process'; -use constant OP_DOC_RENDER_PROCESS_TAG => OP_DOC_RENDER . '->processTag'; -use constant OP_DOC_RENDER_PROCESS_TEXT => OP_DOC_RENDER . '->processText'; -use constant OP_DOC_RENDER_NEW => OP_DOC_RENDER . '->new'; -use constant OP_DOC_RENDER_SAVE => OP_DOC_RENDER . '->save'; - #################################################################################################################################### # Render tags for various output types #################################################################################################################################### @@ -156,7 +145,7 @@ sub new ) = logDebugParam ( - OP_DOC_RENDER_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'strType'}, {name => 'oManifest'}, {name => 'strRenderOutKey', required => false} @@ -431,7 +420,7 @@ sub process ) = logDebugParam ( - OP_DOC_RENDER_PROCESS, \@_, + __PACKAGE__ . '->process', \@_, {name => 'oDoc', trace => true}, {name => 'iDepth', default => 1, trace => true}, {name => 'bChildList', default => true, trace => true} @@ -601,7 +590,7 @@ sub processTag ) = logDebugParam ( - OP_DOC_RENDER_PROCESS_TAG, \@_, + __PACKAGE__ . '->processTag', \@_, {name => 'oTag', trace => true} ); @@ -720,7 +709,7 @@ sub processText ) = logDebugParam ( - OP_DOC_RENDER_PROCESS_TEXT, \@_, + __PACKAGE__ . '->processText', \@_, {name => 'oText', trace => true} ); @@ -794,7 +783,7 @@ sub save ) = logDebugParam ( - OP_DOC_RENDER_SAVE, \@_, + __PACKAGE__ . '->save', \@_, {name => 'strFileName', trace => true}, {name => 'strBuffer', trace => true} ); diff --git a/doc/lib/BackRestDoc/Html/DocHtmlBuilder.pm b/doc/lib/BackRestDoc/Html/DocHtmlBuilder.pm index 31ce89d40..216e639b7 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlBuilder.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlBuilder.pm @@ -18,15 +18,6 @@ use pgBackRest::Common::String; use BackRestDoc::Html::DocHtmlElement; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_HTML_BUILDER => 'DocHtmlBuilder'; - -use constant OP_DOC_HTML_BUILDER_NEW => OP_DOC_HTML_BUILDER . '->new'; -use constant OP_DOC_HTML_BUILDER_HTML_GET => OP_DOC_HTML_BUILDER . '->htmlGet'; -use constant OP_DOC_HTML_BUILDER_HTML_RENDER => OP_DOC_HTML_BUILDER . '->htmlRender'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -52,7 +43,7 @@ sub new ) = logDebugParam ( - OP_DOC_HTML_BUILDER_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'strName'}, {name => 'strTitle'}, {name => 'strFavicon', required => false}, @@ -125,7 +116,7 @@ sub htmlRender ) = logDebugParam ( - OP_DOC_HTML_BUILDER_HTML_RENDER, \@_, + __PACKAGE__ . '->htmlRender', \@_, {name => 'oElement', trace => true}, {name => 'iDepth', trace => true} ); @@ -191,7 +182,7 @@ sub htmlGet my $self = shift; # Assign function parameters, defaults, and log debug info - my ($strOperation) = logDebugParam(OP_DOC_HTML_BUILDER_HTML_GET); + my ($strOperation) = logDebugParam(__PACKAGE__ . '->htmlGet'); # Build the header my $strHtml = diff --git a/doc/lib/BackRestDoc/Html/DocHtmlElement.pm b/doc/lib/BackRestDoc/Html/DocHtmlElement.pm index e6301f613..9c8dcfb7a 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlElement.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlElement.pm @@ -16,15 +16,6 @@ use Scalar::Util qw(blessed); use lib dirname($0) . '/../lib'; use pgBackRest::Common::Log; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_HTML_ELEMENT => 'DocHtmlElement'; - -use constant OP_DOC_HTML_ELEMENT_ADD => OP_DOC_HTML_ELEMENT . '->add'; -use constant OP_DOC_HTML_ELEMENT_ADD_NEW => OP_DOC_HTML_ELEMENT . '->addNew'; -use constant OP_DOC_HTML_ELEMENT_NEW => OP_DOC_HTML_ELEMENT . '->new'; - #################################################################################################################################### # Html Element Types #################################################################################################################################### @@ -61,7 +52,7 @@ sub new ) = logDebugParam ( - OP_DOC_HTML_ELEMENT_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'strType', trace => true}, {name => 'strClass', required => false, trace => true}, {name => 'oParam', required => false, trace => true} @@ -99,7 +90,7 @@ sub addNew ) = logDebugParam ( - OP_DOC_HTML_ELEMENT_ADD_NEW, \@_, + __PACKAGE__ . '->addNew', \@_, {name => 'strType', trace => true}, {name => 'strClass', required => false, trace => true}, {name => 'oParam', required => false, trace => true} @@ -133,7 +124,7 @@ sub add ) = logDebugParam ( - OP_DOC_HTML_ELEMENT_ADD, \@_, + __PACKAGE__ . '->add', \@_, {name => 'oElement', trace => true} ); diff --git a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm index c5dd72b16..c0702e8a4 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlPage.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlPage.pm @@ -24,17 +24,6 @@ use BackRestDoc::Common::DocManifest; use BackRestDoc::Html::DocHtmlBuilder; use BackRestDoc::Html::DocHtmlElement; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_HTML_PAGE => 'DocHtmlPage'; - -use constant OP_DOC_HTML_PAGE_BACKREST_CONFIG_PROCESS => OP_DOC_HTML_PAGE . '->backrestConfigProcess'; -use constant OP_DOC_HTML_PAGE_NEW => OP_DOC_HTML_PAGE . '->new'; -use constant OP_DOC_HTML_PAGE_POSTGRES_CONFIG_PROCESS => OP_DOC_HTML_PAGE . '->postgresConfigProcess'; -use constant OP_DOC_HTML_PAGE_PROCESS => OP_DOC_HTML_PAGE . '->process'; -use constant OP_DOC_HTML_PAGE_SECTION_PROCESS => OP_DOC_HTML_PAGE . '->sectionProcess'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -52,7 +41,7 @@ sub new ) = logDebugParam ( - OP_DOC_HTML_PAGE_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strRenderOutKey'}, {name => 'bExe'} @@ -80,7 +69,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_HTML_PAGE_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); # Working variables my $oPage = $self->{oDoc}; @@ -206,7 +195,7 @@ sub sectionProcess ) = logDebugParam ( - OP_DOC_HTML_PAGE_SECTION_PROCESS, \@_, + __PACKAGE__ . '->sectionProcess', \@_, {name => 'oSection'}, {name => 'strAnchor', required => false}, {name => 'iDepth'} @@ -437,7 +426,7 @@ sub backrestConfigProcess ) = logDebugParam ( - OP_DOC_HTML_PAGE_BACKREST_CONFIG_PROCESS, \@_, + __PACKAGE__ . '->backrestConfigProcess', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} @@ -495,7 +484,7 @@ sub postgresConfigProcess ) = logDebugParam ( - OP_DOC_HTML_PAGE_POSTGRES_CONFIG_PROCESS, \@_, + __PACKAGE__ . '->postgresConfigProcess', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} diff --git a/doc/lib/BackRestDoc/Html/DocHtmlSite.pm b/doc/lib/BackRestDoc/Html/DocHtmlSite.pm index 55cdbc5a0..dc22ba3bf 100644 --- a/doc/lib/BackRestDoc/Html/DocHtmlSite.pm +++ b/doc/lib/BackRestDoc/Html/DocHtmlSite.pm @@ -28,14 +28,6 @@ use BackRestDoc::Common::DocConfig; use BackRestDoc::Common::DocManifest; use BackRestDoc::Html::DocHtmlPage; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_HTML_SITE => 'DocHtmlSite'; - -use constant OP_DOC_HTML_SITE_NEW => OP_DOC_HTML_SITE . '->new'; -use constant OP_DOC_HTML_SITE_PROCESS => OP_DOC_HTML_SITE . '->process'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -62,7 +54,7 @@ sub new ) = logDebugParam ( - OP_DOC_HTML_SITE_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strXmlPath'}, {name => 'strHtmlPath'}, @@ -102,7 +94,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_HTML_SITE_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); # Copy the css file my $strCssFileDestination = "$self->{strHtmlPath}/default.css"; diff --git a/doc/lib/BackRestDoc/Latex/DocLatex.pm b/doc/lib/BackRestDoc/Latex/DocLatex.pm index 1d81288c8..9cf70308d 100644 --- a/doc/lib/BackRestDoc/Latex/DocLatex.pm +++ b/doc/lib/BackRestDoc/Latex/DocLatex.pm @@ -28,14 +28,6 @@ use BackRestDoc::Common::DocConfig; use BackRestDoc::Common::DocManifest; use BackRestDoc::Latex::DocLatexSection; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_LATEX => 'DocLatex'; - -use constant OP_DOC_LATEX_NEW => OP_DOC_LATEX . '->new'; -use constant OP_DOC_LATEX_PROCESS => OP_DOC_LATEX . '->process'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -60,7 +52,7 @@ sub new ) = logDebugParam ( - OP_DOC_LATEX_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strXmlPath'}, {name => 'strLatexPath'}, @@ -98,7 +90,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_LATEX_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); my $oRender = $self->{oManifest}->renderGet(RENDER_TYPE_PDF); diff --git a/doc/lib/BackRestDoc/Latex/DocLatexSection.pm b/doc/lib/BackRestDoc/Latex/DocLatexSection.pm index fd5078e9f..0c77303c0 100644 --- a/doc/lib/BackRestDoc/Latex/DocLatexSection.pm +++ b/doc/lib/BackRestDoc/Latex/DocLatexSection.pm @@ -24,16 +24,6 @@ use pgBackRest::FileCommon; use BackRestDoc::Common::DocManifest; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_LATEX_SECTION => 'DocLatexSection'; - -use constant OP_DOC_LATEX_SECTION_CONFIG_PROCESS => OP_DOC_LATEX_SECTION . '->configProcess'; -use constant OP_DOC_LATEX_SECTION_NEW => OP_DOC_LATEX_SECTION . '->new'; -use constant OP_DOC_LATEX_SECTION_PROCESS => OP_DOC_LATEX_SECTION . '->process'; -use constant OP_DOC_LATEX_SECTION_SECTION_PROCESS => OP_DOC_LATEX_SECTION . '->sectionProcess'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -51,7 +41,7 @@ sub new ) = logDebugParam ( - OP_DOC_LATEX_SECTION_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strRenderOutKey'}, {name => 'bExe'} @@ -79,7 +69,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_LATEX_SECTION_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); # Working variables my $oPage = $self->{oDoc}; @@ -121,7 +111,7 @@ sub sectionProcess ) = logDebugParam ( - OP_DOC_LATEX_SECTION_SECTION_PROCESS, \@_, + __PACKAGE__ . '->sectionRender', \@_, {name => 'oSection'}, {name => 'strSection', required => false}, {name => 'iDepth'} @@ -369,7 +359,7 @@ sub configProcess ) = logDebugParam ( - OP_DOC_LATEX_SECTION_CONFIG_PROCESS, \@_, + __PACKAGE__ . '->configProcess', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} diff --git a/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm b/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm index fcc42026f..843ad502e 100644 --- a/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm +++ b/doc/lib/BackRestDoc/Markdown/DocMarkdown.pm @@ -28,14 +28,6 @@ use BackRestDoc::Common::DocConfig; use BackRestDoc::Common::DocManifest; use BackRestDoc::Markdown::DocMarkdownRender; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_MARKDOWN => 'DocMarkdown'; - -use constant OP_DOC_MARKDOWN_NEW => OP_DOC_MARKDOWN . '->new'; -use constant OP_DOC_MARKDOWN_PROCESS => OP_DOC_MARKDOWN . '->process'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -59,7 +51,7 @@ sub new ) = logDebugParam ( - OP_DOC_MARKDOWN_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strXmlPath'}, {name => 'strMarkdownPath'}, @@ -96,7 +88,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_MARKDOWN_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); foreach my $strRenderOutId ($self->{oManifest}->renderOutList(RENDER_TYPE_MARKDOWN)) { diff --git a/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm b/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm index cc6b4b6be..53c348fb3 100644 --- a/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm +++ b/doc/lib/BackRestDoc/Markdown/DocMarkdownRender.pm @@ -22,17 +22,6 @@ use pgBackRest::Config::ConfigHelp; use BackRestDoc::Common::DocManifest; -#################################################################################################################################### -# Operation constants -#################################################################################################################################### -use constant OP_DOC_MARKDOWN_RENDER => 'DocMarkdownRender'; - -use constant OP_DOC_MARKDOWN_RENDER_BACKREST_CONFIG_PROCESS => OP_DOC_MARKDOWN_RENDER . '->backrestConfigProcess'; -use constant OP_DOC_MARKDOWN_RENDER_NEW => OP_DOC_MARKDOWN_RENDER . '->new'; -use constant OP_DOC_MARKDOWN_RENDER_POSTGRES_CONFIG_PROCESS => OP_DOC_MARKDOWN_RENDER . '->postgresConfigProcess'; -use constant OP_DOC_MARKDOWN_RENDER_PROCESS => OP_DOC_MARKDOWN_RENDER . '->process'; -use constant OP_DOC_MARKDOWN_RENDER_SECTION_PROCESS => OP_DOC_MARKDOWN_RENDER . '->sectionProcess'; - #################################################################################################################################### # CONSTRUCTOR #################################################################################################################################### @@ -50,7 +39,7 @@ sub new ) = logDebugParam ( - OP_DOC_MARKDOWN_RENDER_NEW, \@_, + __PACKAGE__ . '->new', \@_, {name => 'oManifest'}, {name => 'strRenderOutKey'}, {name => 'bExe'} @@ -78,7 +67,7 @@ sub process my $self = shift; # Assign function parameters, defaults, and log debug info - my $strOperation = logDebugParam(OP_DOC_MARKDOWN_RENDER_PROCESS); + my $strOperation = logDebugParam(__PACKAGE__ . '->process'); # Working variables my $oPage = $self->{oDoc}; @@ -184,7 +173,7 @@ sub sectionProcess ) = logDebugParam ( - OP_DOC_MARKDOWN_RENDER_SECTION_PROCESS, \@_, + __PACKAGE__ . '->sectionProcess', \@_, {name => 'oSection'}, {name => 'iDepth'} ); @@ -381,7 +370,7 @@ sub backrestConfigProcess ) = logDebugParam ( - OP_DOC_MARKDOWN_RENDER_BACKREST_CONFIG_PROCESS, \@_, + __PACKAGE__ . '->backrestConfigProcess', \@_, {name => 'oSection'}, {name => 'oConfig'}, {name => 'iDepth'} @@ -439,7 +428,7 @@ sub postgresConfigProcess # ) = # logDebugParam # ( - # OP_DOC_MARKDOWN_RENDER_POSTGRES_CONFIG_PROCESS, \@_, + # __PACKAGE__ . '->postgresConfigProcess', \@_, # {name => 'oSection'}, # {name => 'oConfig'}, # {name => 'iDepth'}