Shlomi Fish  committed 8e148c5

Add more.

  • Participants
  • Parent commits ea10fb8

Comments (0)

Files changed (2)

         - lexical variable initialisation problem.
         - use closures instead.
     - calling too much for the shell for help.
+    - missing semicolons in the last statements of blocks.

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

+<item id="missing-semicolons-at-the-end-of-blocks" h="Missing Semicolons at the end of blocks">
+The perl interpreter allows one to omit the last trailing semicolon (";") in 
+the containing block. Like so:
+if ( COND() )
+     print "Success!\n";
+     call_routine() \# No semicolon here.
+However, this isn't a good idea, because it is inconsistent, and may cause 
+errors (or obscure failures) if one-or-more statements are added afterwards.
+As a result, you should end every statement with a semicolon (";") even if 
+it’s the last one. A possible exception to this may be single-line and/or
+single-statement blocks like in <pdoc_f f="map">map</pdoc_f>.
 #include "bad-elements-sources.wml"