Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Code style question (updated)

by LanX (Saint)
on May 20, 2021 at 15:50 UTC ( [id://11132782]=note: print w/replies, xml ) Need Help??


in reply to Code style question

> P.S. So what's the right indent: 2 or 4?

The overall consensus is 4, your life will be easier if you start to C&P code then.

The "historic" default for "tab" was 8, so please use blanks.

update

see also older discussions (click "search") like recently [RFC] Review of module code and POD

especially this more complex model: TABs for indentation only, SPACE for alignment

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: Code style question (updated)
by AlexP (Pilgrim) on May 21, 2021 at 07:25 UTC

    Thanks for the helpful links, going to explore them today.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132782]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found