Commits

Shlomi Fish  committed fb61413

Add more.

  • Participants
  • Parent commits 6631f68

Comments (0)

Files changed (1)

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

 
 <p>
 However, it's not necessary to enclose $name in double quotes (i.e: 
-<tt>"$name"</tt>) because it's already a string. Using it byitself as 
+<tt>"$name"</tt>) because it's already a string. Using it by itself as 
 <tt>$name</tt> will do just fine:
 </p>
 
 my $username = shift(@ARGV);
 
 open my $pass_fh, '&lt;', '/etc/passswd'
-    or die "Cannot open /etc/passwd";
+    or die "Cannot open /etc/passwd - $!";
 
 PASSWD:
 while (my $line = &lt;$pass_fh&gt;)
 <item id="qx_for_command_execution" h="`…` or qx// for Executing Commands">
 
 <p>
-Some people are tempted to use backticks (<tt>`…</tt>) or <tt>qx/…/</tt>
+Some people are tempted to use backticks (<tt>`…`</tt>) or <tt>qx/…/</tt>
 for executing commands for their side-effects. E.g:
 </p>
 
 is not advisable, and should be avoided.
 </p>
 
+<p>
+A better option would be to provide methods in the containing objects to
+access those methods of their contained objects. And an even better way would
+be to structure the code so that each object handles its own domain.
+</p>
+
 </item>
 
 <item id="delegating_parameter_passing" h="Passing parameters in delegation">
 to <a href="http://php.net/manual/en/function.include.php">PHP's include</a>
 or <a href="http://ss64.com/bash/period.html">the shell's 
 "source" or "." operators</a>. The answer is that the better way is to extract
-the common functionality from all the programs into 
+the common functionality from all the programs into
 <a href="$(ROOT)/topics/modules-and-packages/">modules</a> and load them by
 using "use" or "require".
 </p>