in reply to Re: Storing karma
in thread Storing karma
If the user database gets too large to be handy, an upgrade would be to tie the hash to a database of some kind. There is one that seems universal to perl installations. ( NDBM? )
Here the hash keys and values are maintained in the database and some subset is also maintained in the hash itself, but elements are transferred implicitly from the database to the hash (and vice-versa) as needed. The 'untie' line puts all new and changed elements out to the database.use NDBM_File; tie(%x, 'NDBM_File', 'karma.db', 1, 0); $x{$user}++; untie(%x);
That last paragraph is clear as mud, hmm..
This page may be of use (or not).
Amused
Edit by tye
|
|---|