avicom의 신변잡기

perltidy tool 본문

LiNux / sTorAge

perltidy tool

avicom 2007. 6. 19. 18:20

펄 코드를 보기좋게 변환해주는 포매팅 툴이다.

.perltidyrc 파일을 만들고 다음 내용을 입력하면 Perl Best Practice 에서 권고한 코딩 가이드라인을 만족하는 포맷으로 변환시켜준다.

    -l=78   # Max line width is 78 cols
    -i=4    # Indent level is 4 cols
    -ci=4   # Continuation indent is 4 cols
    -st     # Output to STDOUT
    -se     # Errors to STDERR
    -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 bracket tightness
    -bbt=1  # Medium block brace tightness
    -nsfs   # No space before semicolons
    -nolq   # Don't outdent long quoted strings
    -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="   
            # Break before all operators