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.20 by root, Sun Jul 16 17:29:02 2006 UTC vs.
Revision 1.21 by root, Sun Jul 16 17:51:40 2006 UTC

169 169
170sub unload_extension { 170sub unload_extension {
171 my ($pkg) = @_; 171 my ($pkg) = @_;
172 172
173 warn "removing extension $pkg\n"; 173 warn "removing extension $pkg\n";
174
175 if (my $cb = $pkg->can ("on_unload")) {
176 $cb->($pkg);
177 }
174 178
175 # remove hooks 179 # remove hooks
176 for my $idx (0 .. $#EVENT) { 180 for my $idx (0 .. $#EVENT) {
177 delete $hook[$idx]{$pkg}; 181 delete $hook[$idx]{$pkg};
178 } 182 }
222 226
223 unload_extension $_ for @exts; 227 unload_extension $_ for @exts;
224 delete $INC{"cf.pm"}; 228 delete $INC{"cf.pm"};
225 229
226 # don't, removes xs symbols, too 230 # don't, removes xs symbols, too
227 #Symbol::delete_package $pkg; 231 #Symbol::delete_package __PACKAGE__;
228 232
229 require cf; 233 require cf;
230 }; 234 };
231 warn $@ if $@; 235 warn $@ if $@;
232 $who->message ($@) if $@; 236 $who->message ($@) if $@;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines