Shared data between in perl module

Юрий Иванов format_hub at
Tue May 18 13:52:15 CEST 2021


I plan to implement accounting logic with the help of perl module.

Looks simple, but every time I should open new database connection which is not very effective in case of high load systems.

sub accounting {
    $redis = Redis->new(server => '', reconnect => 2);

Is there way to make some sort of "shared" variable in perl module?

P.S. Maybe there is even some way to create some buffer array variable inside perl module which persists between perl modules so I can drop redis?

More information about the Freeradius-Users mailing list