📜 ⬆️ ⬇️

Pearl Code Design Guide

image

Of course, each programmer has his own preferences regarding formatting, but there are some general principles that make your programs easy to read, understand, and maintain.

The main thing is that your programs should always run with the -w flag. If necessary, you can purposefully disable this action for specific sections of code through the no warnings or the $^W variable. Also, you should always run programs using use strict , or understand clearly why you are not doing this. The use sigtrap and use diagnostics use sigtrap can also be useful.
')
As for the code design aesthetics, the only thing Larry really cares about is that the closing curly bracket of a multi-line block must be aligned vertically with the keyword that starts the whole construction. In addition, he has other preferences that are not so serious:


Larry has a rationale for all of these pieces, but he does not argue that everyone thinks the same way he does.

Here are a few other more significant clearance questions to think about:

Source: https://habr.com/ru/post/238407/


All Articles