<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p><span style="FONT-SIZE: 10pt">Thanks for this thorough response!</span></p>
<p><span style="FONT-SIZE: 10pt"></span> </p>
<p><span style="FONT-SIZE: 10pt">>> Should we add a PERL rule that prohibits defining lexical variables (my $var) at the outermost block (file level) ?</span></p>
<div style="FONT-FAMILY: Times New Roman; COLOR: #000000; FONT-SIZE: 16px">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>> -1 for scripts -- it's not necessary, and doing anything to tempt folks to use 'our' unnecessarily instead would be worse.  It's sufficient to ensure that any subroutines inside the file aren't inappropriately accessing file-level lexicals, and that's
 easy to test by verifying that the following doesn't emit any warning messages:</div>
<div>You are right. I actually meant the same :) Defining them and using these vars at a lower level.  Recently submitted some code that actually did that (just lazy programming and not passing these vars as parameters).. I would opt for adding such a explicit
 guideline.</div>
<div> </div>
<div>> A provisional +1 for modules, where use of a package-level lexical is a signal that state may be held on to inappropriately.  Running the CGI::Compile test on *.pm files can point out the most egregious examples, though.  </div>
<div>Another guideline here might make us more aware of doing so, or at least make author, signer or QAer perhaps think about it..<br>
</div>
<div>> Even for modules, though usage of 'our' should be discouraged except for VERSION and the like.</div>
<div>Third time lucky: +1</div>
<div> </div>
<div>So now, do we add these coding guidelines? Perhaps under one rule about defining variables? 
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>