… | |
… | |
1176 | } |
1176 | } |
1177 | |
1177 | |
1178 | sub normalise { |
1178 | sub normalise { |
1179 | my ($path, $base) = @_; |
1179 | my ($path, $base) = @_; |
1180 | |
1180 | |
|
|
1181 | $path = "$path"; # make sure its a string |
|
|
1182 | |
1181 | # map plan: |
1183 | # map plan: |
1182 | # |
1184 | # |
1183 | # /! non-realised random map exit (special hack!) |
1185 | # /! non-realised random map exit (special hack!) |
1184 | # {... are special paths that are not being touched |
1186 | # {... are special paths that are not being touched |
1185 | # ?xxx/... are special absolute paths |
1187 | # ?xxx/... are special absolute paths |
… | |
… | |
1221 | $self->init; # pass $1 etc. |
1223 | $self->init; # pass $1 etc. |
1222 | return $self; |
1224 | return $self; |
1223 | } |
1225 | } |
1224 | } |
1226 | } |
1225 | |
1227 | |
1226 | Carp::carp "unable to resolve path '$path'."; |
1228 | Carp::carp "unable to resolve path '$path' (base '$base')."; |
1227 | () |
1229 | () |
1228 | } |
1230 | } |
1229 | |
1231 | |
1230 | sub init { |
1232 | sub init { |
1231 | my ($self) = @_; |
1233 | my ($self) = @_; |
… | |
… | |
1365 | if ($map->should_reset) { |
1367 | if ($map->should_reset) { |
1366 | # doing this can freeze the server in a sync job, obviously |
1368 | # doing this can freeze the server in a sync job, obviously |
1367 | #$cf::WAIT_FOR_TICK->wait; |
1369 | #$cf::WAIT_FOR_TICK->wait; |
1368 | $map->reset; |
1370 | $map->reset; |
1369 | undef $guard; |
1371 | undef $guard; |
1370 | $map = find $path |
1372 | return find $path; |
1371 | or return; |
|
|
1372 | } |
1373 | } |
1373 | |
1374 | |
1374 | $cf::MAP{$path} = $map |
1375 | $cf::MAP{$path} = $map |
1375 | } |
1376 | } |
1376 | } |
1377 | } |