>>>>> "JM" == Jeremy Muhlich <[EMAIL PROTECTED]> writes:

  JM> If you restrict your 'no strict' to a very small block, it's really no
  JM> problem at all.  Best practice is to apply it to the smallest possible
  JM> block possible.  This would be even better than what I initially wrote:

  JM>   foreach ... {
  JM>     # "setup" code here
  JM>     {
  JM>       no strict 'refs';
  JM>       $$varname = <simple expression>;
  JM>     }
  JM>   }

  JM> "simple expression" is ideally a single variable whose value you
  JM> initialize in the "setup" code.  Minimal code under 'no strict' means
  JM> fewer possible errors.

working around strict when you don't need to is a bad idea as well. as i
said before symrefs are for when you have to mung the symbol table. no other
uses should be allowed. there is no need for this. the OP needs to learn
to use hashes for data structures.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to