ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.136 by root, Sat Dec 9 02:21:24 2006 UTC vs.
Revision 1.137 by root, Sat Dec 9 21:26:45 2006 UTC

26use utf8; 26use utf8;
27 27
28use AnyEvent (); 28use AnyEvent ();
29use BerkeleyDB; 29use BerkeleyDB;
30use Pod::POM (); 30use Pod::POM ();
31use Scalar::Util ();
32use File::Path (); 31use File::Path ();
33use Storable (); # finally 32use Storable (); # finally
34 33
35BEGIN { 34BEGIN {
36 use Crossfire::Protocol::Base (); 35 use Crossfire::Protocol::Base ();
162 161
163sub put($$$) { 162sub put($$$) {
164 my ($db, $key, $data) = @_; 163 my ($db, $key, $data) = @_;
165 164
166 my $hkey = $db + 0; 165 my $hkey = $db + 0;
167 Scalar::Util::weaken $db; 166 CFPlus::weaken $db;
168 $DB_SYNC{$hkey} ||= AnyEvent->timer (after => 5, cb => sub { 167 $DB_SYNC{$hkey} ||= AnyEvent->timer (after => 5, cb => sub {
169 delete $DB_SYNC{$hkey}; 168 delete $DB_SYNC{$hkey};
170 $db->db_sync if $db; 169 $db->db_sync if $db;
171 }); 170 });
172 171

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines