Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Call me a "heretic", or consider me still but an "egg" (as I do), but I think I would have to agree that there is no "true" style. As some come to perl from other languages, with the styles those languages impressed upon them, and others find perl without such shackles, we see the philosophy of TMTOWTDI show up even in such things as spacing and bracing and the other small details of coding. The important thing is that the code is usable, maintainable, and that someone can follow it, and if consistently done, so much the better. Just as an example, for code I write only for myself, I tend towards tabs, but sometimes 2 or 4 spaces; for code I post on here recently (and even some for work), I try to first run it through PerlTidy(1) with indention at 4 spaces.(2)

I have found this discussion (and most others) quite instructive, and a help as I continue still to find my way still along this path we call Perl.

-----

  1. But then again, I also prefer lines of either 75 or 123 or 132 characters, and yes, for code I'm having to wade through for myself, I sometimes prefer cuddled elses.(3)
  2. Just my 2 cents, for what it's worth after inflation.
  3. But this is also part of why I still consider myself an "egg".

In reply to Re: The One True Style of indentation: by atcroft
in thread The One True Style of indentation: by Petruchio

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found