Is there a definitive Perl style?

I'm wondering if there is a doc or page with a style guide for Perl. For example, this is the one I'm using for C ++: https://google-styleguide.googlecode.com/svn/trunk/cppguide.html .

Is there a Perl style guide that most people use?

+3


source to share


2 answers


There's perldoc perlstyle in the standard documentation.

As far as code aesthetics go, the only thing Larry really worries about is that the closing curly brace of the multiline BLOCK must match the keyword that triggered the construct. Apart from that, he has other preferences that are not so strong.

.. Larry has reasons for each of these things, but he does not claim that all other people work the same way as him.



If you install a module Perl::Tidy

, it includes a program / tool perltidy

that will reformat your code to match the Larry Wall settings as stated in perlstyle

. With a command line parameter, -pbp

it will match Damian Conway's style preferences expressed in his book Perl Best Practices

.

+6


source


There is Perl Style , written by Tom Christiansen , who is one of the best Perl styles out there.



+3


source







All Articles