You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +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:
		| @@ -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); | ||||
|  | ||||
|   | ||||
| @@ -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'} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user