I have a question on creating a (dot)perltidyrc file for an existing perl code base. The prevailing style must be replicated or the team will not adopt perltidy. This much I feel certain the perltidyrc file must contain: Uses tabs -et=n And newline braces -bli This is where I run into trouble: the code style does not indent new code in the block beyon the new brace ie:
sub old_code { my $self = shift; my $file = shift; if (-e $file) { open(my $fh, "<", $file) or die "cannot open < $file: $!"; # Do something with the file return 1; } else { die "$file not found"; } };
How do I create a perltdyrc file that will replicate this coding style? Thanks, Saltbreez
In reply to perltidy block indentation by saltbreez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |