Skip to main content
  1. Entry/

perltidyをPerl Best Practiceに即した形式にしてくれるパラメータ

<blockquote>
    <pre class="code" data-unlink>perltidy

-q -l=78 # Max line width is 78 cols -i=4 # indent level is 4 cols -ci=4 # Continuation indent is 4 cols -vt=2 # Maximal vertical tightness -cti=0 # No extra indentation for closing brackets -pt=1 # Medium parenthesis tightness -bt=1 # Medium brace tightness -sbt=1 # Medium square brace tightness -bbt=1 # Medium block brace tightness -nsfs # No space for semicolons -nolq # Don't outdent long quoted strings -wbb="% + * / x != == >= <= =~ !~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" # Break before all operators

<blockquote>
    <pre class="code" data-unlink>-pbp, --perl-best-practices
-pbp is an abbreviation for the parameters in the book Perl Best
Practices 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=&#34;% + - * / x != == &gt;= &lt;= =~ !~ &lt; &gt; &amp;#9130; &amp; =
          **= += *= &amp;= &lt;&lt;= &amp;&amp;= -= /= &amp;#9130;= &gt;&gt;= &amp;#9130;&amp;#9130;= //= .= %= ^= x=&#34;

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 nec‐
essary.</pre>
</blockquote>