<div>I don't think it will make a difference since the perl module is instantiated for every request. Unless I mis-understood something.</div>
<div> </div>
<div>Earlier I tried similar to what you suggested - without the {}. but it didn't work.<br><br></div>
<div class="gmail_quote">On Mon, Feb 28, 2011 at 3:49 AM, Dean, Barry <span dir="ltr"><<a href="mailto:B.Dean@liverpool.ac.uk">B.Dean@liverpool.ac.uk</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div style="WORD-WRAP: break-word">Yes. Do something like this:
<div><br></div>
<div>{</div>
<div><span style="WHITE-SPACE: pre-wrap"></span>my %static_global_hash = ();</div>
<div><br></div>
<div><span style="WHITE-SPACE: pre-wrap"></span>sub post_auth {</div>
<div><span style="WHITE-SPACE: pre-wrap"></span>...</div>
<div><span style="WHITE-SPACE: pre-wrap"></span>}</div>
<div><span style="WHITE-SPACE: pre-wrap"></span>...</div>
<div>}</div>
<div><br></div>
<div>static_global_hash will then be available on each call to the subs so you can store some kind of state between requests that you handle.</div>
<div><br></div>
<div>The trick is placing the whole lot into a {} block. Perl can be odd at times...</div>
<div><br>
<div>
<div>
<div></div>
<div class="h5">
<div>On 25 Feb 2011, at 20:25, Vinh Nguyen wrote:</div><br></div></div>
<blockquote type="cite">
<div>
<div></div>
<div class="h5">
<p>hi all,</p>
<p>I was able to setup my freeradius to use perl and mysql. Things are working<br>ok. I wanted to use a global hash variable to store information. This way<br>all other requests can also access this hash variable. Is this doable? I<br>
know you can use mysql for this purpose, but i wanted to reduce the # of<br>mysql hits.</p>
<p>Thanks.<br clear="all"><br>-- <br>Computer Science B.S. at Texas A&M<br>C# .Net Developer<br>Server Analyst.<br></p></div></div>-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a></blockquote>
</div><br>
<div><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px"><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px">
<div style="WORD-WRAP: break-word">
<div>
<div>
<div>
<div>
<div>
<div>
<div>----------------------<br>Barry Dean<br>Principal Programmer/Analyst<br>Networks Group<br>Computing Services Department<br></div>
<div><br></div></div></div></div></div></div></div></div></span></span><span></span><br><span></span><span></span><span></span><span><img src="" width="185" height="46"></span><span style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Optima; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px">
<div><br>---</div>
<div>Nice boy, but about as sharp as a sack of wet mice.<br> -- Foghorn Leghorn<br></div></span></span></span></span></span></span></div><br></div></div><br>-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Computer Science B.S. at Texas A&M<br>C# .Net Developer<br>Server Analyst.<br>