Shlomi Fish avatar Shlomi Fish committed 8f696c2

Add an item to the Bad elements list.

Comments (0)

Files changed (2)

 
 CURRENT TASKS:
     - Bad elements page:
-        - Unrelated packages (e.g: OtherModule) inside MyModule.
-            - Preferably every package should be inside one module (except for
-            private ones).
         - Non-explicit imports.
             - hard to track where identifiers come from.
     - Add a page about file/directory-handling :
       @ Added [Tue 2013-05-21]
     - Bad elems: Packaging as a CPAN distribution.
         @ DONE [Tue 2013-05-28]
+    - Bad elems: unrelated packages (e.g: OtherModule) inside MyModule.
+        - Preferably every package should be inside one module (except for
+        private ones).
+        @ DONE [Sun 2013-06-09]
 
 # vim:ft=quicktask:sw=4:ts=4:et

src/tutorials/bad-elements/perl-elements-to-avoid.xml-grammar-vered.xml

 </p>
 
 </item>
+<item xml:id="unrelated_packages_inside_modules">
+<info>
+<title>Unrelated packages inside modules</title>
+</info>
+
+<p>
+If your module is <code>lib/MyModule.pm</code>, then it should only contain
+namespaces/packages under <code>MyModule::</code>. If it contains
+<code>package OtherModule;</code> then this in turn will be harder
+to find and confusing. Preferably, every package should be inside its own
+module (except for privately used ones).
+</p>
+
+</item>
 </section>
 <section xml:id="sources_of_advice">
 <info>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.