X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bin%2Fperltidy;h=141f10ab023117638332ce01ca23358cbab38294;hb=8aa69fbac36a21cad0a1c0d5b3452a546d427d7f;hp=24870fdc9d5d81f9a8195f1f7249a9aceb5764b8;hpb=8650cadc9aaa12d0fb1d7025ad8fefda9c3df636;p=perltidy.git diff --git a/bin/perltidy b/bin/perltidy index 24870fd..141f10a 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -419,8 +419,6 @@ where s=C, C, C, or C. This flag tells perltidy to output line endings for a specific system. Normally, perltidy writes files with the line separator character of the host system. The C and C flags have an identical result. -B: This only works under unix-like systems and is ignored under -other systems. =item B<-ple>, B<--preserve-line-endings> @@ -430,8 +428,6 @@ B, B, and B line endings. It will only work if perltidy input comes from a filename (rather than stdin, for example). If perltidy has trouble determining the input file line ending, it will revert to the default behavior of using the line ending of the host system. -B: This only works under unix-like systems and is ignored under -other systems. =back @@ -784,7 +780,7 @@ a space takes priority. It is necessary to have a list of all token types in order to create this type of input. Such a list can be obtained by the command -B<--dump-token-types>. Also try the -D flag on a short snippet of code +B<--dump-token-types>. Also try the B<-D> flag on a short snippet of code and look at the .DEBUG file to see the tokenization. B Be sure to put these tokens in quotes to avoid having them @@ -1690,11 +1686,11 @@ command-line parameter always overwrites the previous one before perltidy ever sees it. By default, perltidy breaks B these token types: - % + - * / x != == >= <= =~ !~ < > | & >= < - = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x= + % + - * / x != == >= <= =~ !~ < > | & + = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x= And perltidy breaks B these token types by default: - . << >> -> && || + . << >> -> && || // To illustrate, to cause a break after a concatenation operator, C<'.'>, rather than before it, the command line would be @@ -1707,7 +1703,7 @@ math operators C<'+'>, C<'-'>, C<'/'>, and C<'*'>: -wbb="+ - / *" These commands should work well for most of the token types that perltidy uses -(use B<--dump-token-types> for a list). Also try the -D flag on a short +(use B<--dump-token-types> for a list). Also try the B<-D> flag on a short snippet of code and look at the .DEBUG file to see the tokenization. However, for a few token types there may be conflicts with hardwired logic which cause unexpected results. One example is curly braces, which should be controlled @@ -1860,9 +1856,9 @@ return lists, such as C and . This allows chains of these operators to be displayed one per line. Use B<-nbok> to prevent retaining these breakpoints. -=item B<-bot>, B<--break-at-old-trinary-breakpoints> +=item B<-bot>, B<--break-at-old-ternary-breakpoints> -By default, if a conditional (trinary) operator is broken at a C<:>, +By default, if a conditional (ternary) operator is broken at a C<:>, then it will remain broken. To prevent this, and thereby form longer lines, use B<-nbot>. @@ -1967,6 +1963,18 @@ style overrides the default style with the following parameters: -lp -bl -noll -pt=2 -bt=2 -sbt=2 -icp +=item B<-pbp>, B<--perl-best-practices> + +B<-pbp> is an abbreviation for the parameters in the book B +by Damian Conway: + + -l=78 -i=4 -ci=4 -st -se -vt=2 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nsfs -nolq + -wbb="% + - * / x != == >= <= =~ !~ < > | & = + **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x=" + +Note that the -st and -se flags make perltidy act as a filter on one file only. +These can be overridden with -nst and -nse if necessary. + =back =head2 Other Controls @@ -2533,7 +2541,7 @@ The following list shows all short parameter names which allow a prefix dwrs dws f fll frm fs hsc html ibc icb icp iob isbc lal log lp lsl ohbr okw ola oll opr opt osbr otr ple ple pod pvl q sbc sbl schb scp scsb sct se sfp sfs skp sob sohb sop sosb sot - ssc st sts syn t tac tbc toc tp tqw tsc w x + ssc st sts syn t tac tbc toc tp tqw tsc w x bar Equivalently, the prefix 'no' or 'no-' on the corresponding long names may be used. @@ -2607,7 +2615,7 @@ perlstyle(1), Perl::Tidy(3) =head1 VERSION -This man page documents perltidy version 20060614. +This man page documents perltidy version 20070424. =head1 CREDITS