Linux guidelines or no, it's 3 space indent for me. Why? Well you are always going to run into someone who has their tapstop set different than you, or someone is going to mix tabs and spaces, so converting all tabs to spaces ensures your code renders nice and cleanly.
3 space is just the right about of readable to me, I really can't explain it. I guess I don't like to see a lot of whitesapce, and 2 is not enough for me to read indent levels quickly.
Also, when I feel like it, I intent places that typically are not intended, such as parameter lists like in Tk or OO functions:
Whatever::Foo->new(
-bar => 'xyz',
-baz => 'def',
);
Let's not start the flamewar as to where curly braces go, but I like them on the same line as the if, since (at least to me) scrolling cuts into readability. At least Perl enforces blocks on if statements!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.