You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-12-15 23:33:42 +02:00
Remove redundant lines from embedded Perl by combining blank lines.
This commit is contained in:
@@ -76,6 +76,8 @@ sub buildEmbed
|
|||||||
" .name = \"${strModule}\",\n" .
|
" .name = \"${strModule}\",\n" .
|
||||||
" .data =\n";
|
" .data =\n";
|
||||||
|
|
||||||
|
my $strLfLine = undef;
|
||||||
|
|
||||||
# Process each line
|
# Process each line
|
||||||
foreach my $strLine (split("\n", $strData))
|
foreach my $strLine (split("\n", $strData))
|
||||||
{
|
{
|
||||||
@@ -92,9 +94,20 @@ sub buildEmbed
|
|||||||
# Remove leading/trailing spaces
|
# Remove leading/trailing spaces
|
||||||
$strLine = trim($strLine);
|
$strLine = trim($strLine);
|
||||||
|
|
||||||
# Output line
|
# If empty line then add it to the total empty lines
|
||||||
$strBuildSource .=
|
if ($strLine eq "")
|
||||||
" \"$strLine\\n\"\n";
|
{
|
||||||
|
$strLfLine .= "\\n";
|
||||||
|
}
|
||||||
|
# Output line (and empty lines if any)
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$strBuildSource .=
|
||||||
|
(defined($strLfLine) ? " \"$strLfLine\"\n" : '') .
|
||||||
|
" \"$strLine\\n\"\n";
|
||||||
|
|
||||||
|
$strLfLine = undef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$strBuildSource .=
|
$strBuildSource .=
|
||||||
|
|||||||
@@ -78,6 +78,10 @@
|
|||||||
<release-item>
|
<release-item>
|
||||||
<p>Rename error-handling variables in <code>Main.pm</code> to conform to standard.</p>
|
<p>Rename error-handling variables in <code>Main.pm</code> to conform to standard.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<p>Remove redundant lines from embedded Perl by combining blank lines.</p>
|
||||||
|
</release-item>
|
||||||
</release-development-list>
|
</release-development-list>
|
||||||
</release-core-list>
|
</release-core-list>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user