Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Code style question

by tangent (Vicar)
on May 20, 2021 at 15:57 UTC ( #11132785=note: print w/replies, xml ) Need Help??


in reply to Code style question

Get yourself a copy of the book 'Perl Best Practices'. There is also a module called Perl::Critic which you can run your code through and it will highlight where you are deviating from the guidelines in the book. It can be a bit annoying at first but it is highly configurable and well worth it in the long run. Here is a short introduction.

Replies are listed 'Best First'.
Re^2: Code style question
by BillKSmith (Monsignor) on May 20, 2021 at 18:07 UTC
    Perhaps the most important advice in Damion's book appears early in Chapter 2.
    All that matters is that you adopt a single, coherent style; one that works for your entire programming team. And having agreed upon that style, that you then apply it consistently across all your development.
    Bill

      Note about teams sounds very reasonable.

        The definition of "team" can be expanded to refer to yourself and your future self. When you adopt a consistent style everything becomes much easier when you need to change something down the line.
Re^2: Code style question
by ikegami (Patriarch) on May 20, 2021 at 17:14 UTC

    Take suggestions with a grain of salt. But yeah, it could definitely be a rewarding experience.

    Seeking work! You can reach me at ikegami@adaelis.com

Re^2: Code style question
by AlexP (Scribe) on May 21, 2021 at 07:34 UTC

    Perl::Critic seems very interesting.

    And thanks for the book. It's not the first time I've heard about 'Perl Best Practices', so going to find my copy.

      Welcome AlexP to The Monastery

      I too am a fan of Perl Critic. Since being introduced to it here in The Monastery a few months ago, I have tested all new code against it. I especially like that different levels of scrutiny can be set. I like to get code to pass the 'stern' test but always look beyond that so I can learn...and ignore the stricter elements that don't suit my use case.

        I have big intention to start using it in the near future in all my perl projects.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2022-01-22 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?