Theo Van Dinter <[EMAIL PROTECTED]> writes:
> I don't think we ever came up with an "official" set of standards. In
> general:
>
> - indents are 2 spaces
> - use 'if (expr) {', although 'if ( expr ) {' is tolerated when I do it. ;)
>
> uhh... that's all I can remember.
We generally (about 54-59% of our perl code) collapse each set of 8
leading spaces into a tab.
Blank line after initial declarations of a sub. Blank lines in rest of
sub are optional.
I agree about not using cuddled else, but I don't think we should start
using spaces around if and while expressions. I don't know when that
started, but it's really annoying.
Also note that 80 columns is our width. It's okay to exceed that on
rare occasions where it is necessary or looks much better, but it's
generally better to go on to the next line.
Bob Apthorpe <[EMAIL PROTECTED]> writes:
> # perltidyrc
> -i=2 # use n columns per indentation level (default n=4)
Yes, although I think 4 would be better.
> -nt # no tabs: use n spaces per indentation level (default)
Not quite, see above.
> -bt=2 # sets brace tightness, n= (0 = loose, 1=default, 2 = tight)
I think we use 1?
> -pt=2 # paren tightness (n=0, 1 or 2)
definitely 2.
> -sbt=2 # square bracket tightness (n=0, 1, or 2)
definitely 2.
> -ce # cuddled else; use this style: '} else {'
Disagreement on this one. I think Justin does this, but nobody else
does.
> -bar # opening brace always on right, even for long clauses
I think -nbl is closer.
Daniel
--
Daniel Quinlan anti-spam (SpamAssassin), Linux,
http://www.pathname.com/~quinlan/ and open source consulting