hi all

is there any way to define a "global" variable in a startup hook that can be
used anywhere else (a pre or post-auth hook) in the code?
I want to parse a file on startup (initialization/hangup) and to load some
values related to pricing plans and access-control structures to hashes or
arrays (perl complex data structures) and to access them every time the post
auth hook is called, without having to load them into memory again and
again. This data is static and Radiator or any of the hooks are going to
change it.

I guess I would want to define them as part of the Radius::Radius class or
something, but I don't know the correct way to access them in the post auth
hook can anyone help me ?

take a look at this example:

###startup hook
sub
{

%acct_info= ("001"  => ["0","access denied: wrong pricing plan"],
                    "0231"   => ["1","access denied: you have exceeded
monthly usage"],
                     (...)
                      );

}

###post auth hook
sub
{
print ${$acct_info{"0231"}}[2];
}




===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to