Subject: | RFE ability to add blank line before/after var definition block |
Date: | Tue, 13 Nov 2018 16:28:10 +0000 |
To: | "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org> |
From: | Todd Richmond <trichmond [...] proofpoint.com> |
Most formatters for other languages I have used have the ability to add a blank line to separate variable definitions from logic. This is often mixed with the option to delete all other blank lines to make code as compact as possible but still leave a list of variables as a separate block. Some formatters have an option to add a blank line before a variable def block as well when it is placed in the middle of a function. I tried playing with every possible option and looked through the code, but didn’t see anything related to definition blocks. Without such an option, I can’t remove other unnecessary blank lines
my $b = 1;
local $i = 55;
if ($b)
printf “$i\n”;