Commits

shl...@13c2ddb8-3aa7-4284-800b-8db07c650eef  committed c3f37f4

Covered law of demeter

  • Participants
  • Parent commits 22e5098

Comments (0)

Files changed (3)

         accept. They are shorter than the eqvuivalent while...continue loops.
     - http://www.stonehenge.com/merlyn/UnixReview/col52.html
         - $object->new() to create a new instance.
+    - Law of Demeter
 
         - pass items from one subroutine to another.
             - use objects.
             - assign them to slots.
-    - Law of Demeter
 
 * Link to Fomberg's Hebrew with Perl site.
 

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

 
 </item>
 
+<item id="law_of_demeter" h="Law of Demeter">
+
+<p>
+See the <a href="http://en.wikipedia.org/wiki/Law_of_Demeter">Wikipedia article
+about "Law of Demeter" for more information</a>. Namely, doing many nested
+method calls like 
+<tt>$self-&gt;get_employee('sophie')-&gt;get_address()-&gt;get_street()</tt>
+is not advisable, and should be avoided.
+</p>
+
+</item>
+
 </main_list>
 
 #include "bad-elements-sources.wml"