… | |
… | |
502 | our @CB_CLIENT = (); |
502 | our @CB_CLIENT = (); |
503 | our @CB_TYPE = (); # registry for type (cf-object class) based events |
503 | our @CB_TYPE = (); # registry for type (cf-object class) based events |
504 | our @CB_MAP = (); |
504 | our @CB_MAP = (); |
505 | |
505 | |
506 | my %attachment; |
506 | my %attachment; |
|
|
507 | |
|
|
508 | sub cf::attachable::thawer_merge { |
|
|
509 | # simply override everything except _meta |
|
|
510 | local $_[0]{_meta}; |
|
|
511 | %{$_[0]} = %{$_[1]}; |
|
|
512 | } |
507 | |
513 | |
508 | sub _attach_cb($$$$) { |
514 | sub _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 | |
|
|
1155 | sub 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 | |
1149 | sub normalise { |
1164 | sub normalise { |
1150 | my ($path, $base) = @_; |
1165 | my ($path, $base) = @_; |
1151 | |
1166 | |
1152 | # map plan: |
1167 | # map plan: |
1153 | # |
1168 | # |
… | |
… | |
1249 | |
1264 | |
1250 | sub unlink_save { |
1265 | sub 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 | |
1258 | sub load_header_from($) { |
1273 | sub load_header_from($) { |
1259 | my ($self, $path) = @_; |
1274 | my ($self, $path) = @_; |
1260 | |
1275 | |