… | |
… | |
63 | } else { |
63 | } else { |
64 | Coro::EV::timer_once $SCHEDULE_INTERVAL; |
64 | Coro::EV::timer_once $SCHEDULE_INTERVAL; |
65 | } |
65 | } |
66 | |
66 | |
67 | # this weird form of iteration over values is used because |
67 | # this weird form of iteration over values is used because |
68 | # the hash changes underneath us frequently, and for |
68 | # the hash changes underneath us frequently, and 'for' |
69 | # keeps a direct reference to the value without (in 5.8 perls) |
69 | # keeps a direct reference to the value without (in 5.8 perls) |
70 | # keeping a reference, so this is prone to crashes or worse. |
70 | # keeping a reference, so this is prone to crashes or worse. |
71 | my @maps = keys %cf::MAP; |
71 | my @maps = keys %cf::MAP; |
72 | for (@maps) { |
72 | for (@maps) { |
73 | my $map = $cf::MAP{$_} |
73 | my $map = $cf::MAP{$_} |
… | |
… | |
104 | $SCHEDULER->prio (-2); |
104 | $SCHEDULER->prio (-2); |
105 | }; |
105 | }; |
106 | |
106 | |
107 | # purely for debugging, will load ALL maps |
107 | # purely for debugging, will load ALL maps |
108 | sub loadall { |
108 | sub loadall { |
|
|
109 | my $maps = cf::map::static_maps; |
|
|
110 | |
|
|
111 | for my $path (@$maps) { |
|
|
112 | my $map = cf::map::find $path |
|
|
113 | or warn "ERROR: unable to find map $path\n"; |
|
|
114 | $map->load; |
|
|
115 | } |
109 | } |
116 | } |
110 | |
117 | |
111 | |
118 | |