1. Shlomi Fish
  2. perl-begin


Shlomi Fish  committed c2e03e0

Add another bad element.

  • Participants
  • Parent commits 8f696c2
  • Branches default

Comments (0)

Files changed (2)

File TODO.txt

View file
  • Ignore whitespace
     - Bad elements page:
-        - Non-explicit imports.
-            - hard to track where identifiers come from.
     - Add a page about file/directory-handling :
         - Will share a lot of content with the Sys Admin page.
         - Refer to perldoc -f open and perldoc perlopentut.
         - Preferably every package should be inside one module (except for
         private ones).
         @ DONE [Sun 2013-06-09]
+    - Bad elems: non-explicit imports.
+        - hard to track where identifiers come from.
+        @ DONE [Sun 2013-06-09]
 # vim:ft=quicktask:sw=4:ts=4:et

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

View file
  • Ignore whitespace
+<item xml:id="non_explicitly_imported_symbols">
+<title>Non-explicitly-imported symbols</title>
+When importing symbols from packages, it is a good idea to specify the symbols
+that are reported explicitly, so one won't have to wonder where variables are
+coming from. So:
+<bad_code syntax="perl">
+use MyLib;
+print my_function(3,5), "\n";
+Should be replaced with:
+<code_blk syntax="perl">
+use MyLib qw( my_function );
+print my_function(3,5), "\n";
 <section xml:id="sources_of_advice">