2 This is a partial "wish-list" of features to add and things to do.
4 Perltidy not idempotent
5 Perltidy does a single pass but iterates locally to try to satisfy the
6 various constraints and formatting parameters, but in some cases it can
7 take a second pass to reach a stable format, particularly when major
8 format style changes are made. It would be useful to have a flag to
9 force a second pass, say --passes=2.
11 For now, a workaround for a single file is
13 perltidy file.pl -st | perltidy -o file.tdy
15 The starting indentation level is not correctly guessed when tabs are used
16 When formatting a snippet which does not begin at zero indentation,
17 perltidy must guess the starting indentation. The -sil flag can be used
18 to specify this, but this is tedious. In general we cannot know the
19 indentation and can only guess, but we can at least require that if
20 perltidy is run twice on the same snippet, with the same parameters,
21 that the indentation be correctly guessed on the second pass. Currently,
22 this is only true if there are no tabs in the leading whitespace. A
23 patch has been submitted to fix this but it needs a little work still.
25 -b does not work through the Tidy module
26 The use of -b in the following does not work:
31 my $file = File::Spec->catfile( $dir,
37 perltidyrc => $perltidyrc,
40 A temporary workaround is:
44 perltidyrc => $perltidyrc,
47 Improved Vertical Alignment
48 There are still many opportunities for improving vertical alignment.
51 A FAQ is needed to explain some of the more subtle formatting issues,
52 and to give examples of different styles.
54 The -formatter callback object documentation is incomplete.
57 The HTML writer does not colorize interpolated identifiers in here
58 documents or quoted strings. The tokenizer outputs interpolation
59 information for here docs; it still needs to be updated to do this for
60 multi-line quotes. Then code needs to be written to scan for and markup
63 Things which have been suggested but will not be done
64 Recursive file processing
65 A -r flag might be nice, but this is best handled by an exterior shell