Commits

Shlomi Fish committed f3fc051

Add Overly Long lines to the bad-elements page.

  • Participants
  • Parent commits ce2ed35

Comments (0)

Files changed (3)

         - SQL injection.
     - initialising arrays (not array refs) using [...] and hashes (not
     hashrefs) using { ... }.
+    - long lines in source code.
     - Using one variable for two different things
         - assignment to a different value in the middle of the subroutine.
     - grep !/\A\./ for getting rid of "." and ".." in readdir().
-    - long lines in source code.
     - assigning a list to a scalar.
 
 * #perl FAQ:
 * "So benchmark your code, see how well it performs and then continue
 reading this page if it is indeed too slow." - missing comma.
 
+* Update the copy of Modern Perl to the latest edition.
+
 Long Term:
 ----------
 

src/tutorials/bad-elements/index.html.wml

 
 </item>
 
+<item id="long_lines" h="Overly Long Lines in the Source Code">
+
+<p>
+It is a good idea to avoid overly long lines in the source code, because
+they need to be scrolled to read, and may not fit within the margins of your
+co-developers’ text editors. If the lines are too long, you should break
+them or reformat them (for example, by adding a newline before or after an
+operator), and by breaking long string constants into several lines using
+the string concatenation operator - <tt>.</tt>.
+</p>
+
+<p>
+Many coding standards require lines to fit within 80 characters or
+78 characters or so, and you should standardise on a similar limit for your
+own code.
+</p>
+
+</item>
+
 </main_list>
 
 #include "bad-elements-sources.wml"