Yes. Do something like this:

{
my %static_global_hash = ();

sub post_auth {
...
}
...
}

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.

The trick is placing the whole lot into a {} block. Perl can be odd at times...

On 25 Feb 2011, at 20:25, Vinh Nguyen wrote:


hi all,

I was able to setup my freeradius to use perl and mysql. Things are working
ok. I wanted to use a global hash variable to store information. This way
all other requests can also access this hash variable. Is this doable? I
know you can use mysql for this purpose, but i wanted to reduce the # of
mysql hits.

Thanks.

--
Computer Science B.S. at Texas A&M
C# .Net Developer
Server Analyst.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

----------------------
Barry Dean
Principal Programmer/Analyst
Networks Group
Computing Services Department


[cid:[email protected]]

---
Nice boy, but about as sharp as a sack of wet mice.
               -- Foghorn Leghorn

<<inline: h1_a.png>>

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to