ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.169 by root, Sun Jan 14 01:09:46 2007 UTC vs.
Revision 1.170 by root, Sun Jan 14 02:00:37 2007 UTC

502our @CB_CLIENT = (); 502our @CB_CLIENT = ();
503our @CB_TYPE = (); # registry for type (cf-object class) based events 503our @CB_TYPE = (); # registry for type (cf-object class) based events
504our @CB_MAP = (); 504our @CB_MAP = ();
505 505
506my %attachment; 506my %attachment;
507
508sub cf::attachable::thawer_merge {
509 # simply override everything except _meta
510 local $_[0]{_meta};
511 %{$_[0]} = %{$_[1]};
512}
507 513
508sub _attach_cb($$$$) { 514sub _attach_cb($$$$) {
509 my ($registry, $event, $prio, $cb) = @_; 515 my ($registry, $event, $prio, $cb) = @_;
510 516
511 use sort 'stable'; 517 use sort 'stable';
1144} 1150}
1145 1151
1146# also paths starting with '/' 1152# also paths starting with '/'
1147$EXT_MAP{"cf::map"} = qr{^(?=/)}; 1153$EXT_MAP{"cf::map"} = qr{^(?=/)};
1148 1154
1155sub thawer_merge {
1156 # we have to keep some variables in memory intact
1157 local $_[0]{path};
1158 local $_[0]{deny_save};
1159 local $_[0]{deny_reset};
1160
1161 $_[0]->SUPER::thawer_merge ($_[1]);
1162}
1163
1149sub normalise { 1164sub normalise {
1150 my ($path, $base) = @_; 1165 my ($path, $base) = @_;
1151 1166
1152 # map plan: 1167 # map plan:
1153 # 1168 #
1249 1264
1250sub unlink_save { 1265sub unlink_save {
1251 my ($self) = @_; 1266 my ($self) = @_;
1252 1267
1253 utf8::encode (my $save = $self->save_path); 1268 utf8::encode (my $save = $self->save_path);
1254 IO::AIO::aioreq_pri 4; IO::AIO::aio_unlink $save; 1269 IO::AIO::aioreq_pri 4; Coro::AIO::aio_unlink $save;
1255 IO::AIO::aioreq_pri 4; IO::AIO::aio_unlink "$save.pst"; 1270 IO::AIO::aioreq_pri 4; Coro::AIO::aio_unlink "$save.pst";
1256} 1271}
1257 1272
1258sub load_header_from($) { 1273sub load_header_from($) {
1259 my ($self, $path) = @_; 1274 my ($self, $path) = @_;
1260 1275

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines