Jonathan Gazeley <[email protected]> wrote:
>
>> However, why do you need to close the handle?  Just when you open it, do
>> your work, store it to the side in a hash and mark it available for use
>> (remember to add locking as it sounds like your script is threaded).
> 
> Please excuse the ignorance - can you elaborate a bit on the process of 
> storing it in a hash, and marking it as available?
> 
Meant to say an array of hashes:
----
my @foobar;
[snipped]
push @foobar, {
        dbh     => $dbh,
        busy    => 0,
};
----

An example of dumping objects into an array of hashes can be seen with:
----
alex@berk:~$ perl -e 'use Digest::MD5; use Data::Dumper; my @foobar; my $md5 = 
Digest::MD5->new; push @foobar, { md5 => $md5, busy => 0 }; print Dumper 
\@foobar'
$VAR1 = [
          {
            'busy' => 0,
            'md5' => bless( do{\(my $o = 23868256)}, 'Digest::MD5' )
          }
        ];
----

Without knowing what queries and logic you are throwing at your database 
and passing back to FreeRADIUS, I have a hard time understanding why you 
could not just use unlang with sql-xlat?

Cheers

-- 
Alexander Clouter
.sigmonster says: Showing up is 80% of life.
                                -- Woody Allen

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

Reply via email to