Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Perl Best Practices -- 20 years later

by pfaut (Priest)
on May 13, 2025 at 11:26 UTC ( [id://11165023]=perlquestion: print w/replies, xml ) Need Help??

pfaut has asked for the wisdom of the Perl Monks concerning the following question:

I've been browsing through the monastery using Random Node. I keep coming across references to Perl::Critic. I downloaded it and ran it against some of my perl code.

Perl::Critic seems to base most if its policies on recommendations from Perl Best Practices. I was intrigued as to the rationale behind many of the policies. There is some documentation within the policy files themselves but I thought it might be useful to have the book. I searched for the book and found it was written in 2005 and hasn't been updated.

How relevant is this book 20 years later? The current version at the time of publication was 5.8. Perl has seen many changes over the last 20 years. Do the book's recommendations still apply? Is there much that's outdated due to new features in the language?

I'll probably buy the book anyway since it does appear to contain a lot of wisdom. I'm just curious how much material would need rewriting if a new edition were to be published today based on perl 5.40.

90% of every Perl application is already written.
dragonchild

Replies are listed 'Best First'.
Re: Perl Best Practices -- 20 years later
by choroba (Cardinal) on May 13, 2025 at 11:31 UTC
    The goal of the book is to make you think about how things should be done, not to give you a one-size-fits-all solution. In this respect, it never gets old.

    See Perl::Critic::Community for a revised and modernised set of perlcritic rules, created mostly by the IRC subset of the Perl community.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: Perl Best Practices -- 20 years later
by swl (Prior) on May 13, 2025 at 22:57 UTC
Re: Perl Best Practices -- 20 years later
by eyepopslikeamosquito (Archbishop) on May 13, 2025 at 23:15 UTC
Re: Perl Best Practices -- 20 years later
by kcott (Archbishop) on May 17, 2025 at 16:47 UTC

    G'day pfaut,

    "... it was written in 2005 and hasn't been updated."

    The book itself hasn't been updated; however, you may be interested in the video "Modern Perl Best Practices" which was released in 2014.

    I don't own the video; although, I did watch a preview many years ago. I'm generally happy to recommend anything by TheDamian (Damian Conway's handle on PerlMonks).

    — Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11165023]
Approved by Corion
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2025-06-16 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.