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.250 by root, Wed Apr 18 14:24:10 2007 UTC vs.
Revision 1.252 by root, Wed Apr 18 15:28:18 2007 UTC

2414 2414
2415 die $$res unless "ARRAY" eq ref $res; 2415 die $$res unless "ARRAY" eq ref $res;
2416 2416
2417 return wantarray ? @$res : $res->[-1]; 2417 return wantarray ? @$res : $res->[-1];
2418 } else { 2418 } else {
2419 local $SIG{__WARN__};
2419 eval { 2420 eval {
2420 local $SIG{__DIE__}; 2421 local $SIG{__DIE__};
2421 local $SIG{__WARN__};
2422 close $fh1; 2422 close $fh1;
2423 2423
2424 my @res = eval { $cb->(@args) }; 2424 my @res = eval { $cb->(@args) };
2425 syswrite $fh2, Coro::Storable::freeze +($@ ? \"$@" : \@res); 2425 syswrite $fh2, Coro::Storable::freeze +($@ ? \"$@" : \@res);
2426 }; 2426 };
2427 2427
2428 warn $@ if $@;
2428 _exit 0; 2429 _exit 0;
2429 } 2430 }
2430} 2431}
2431 2432
2432 2433
2700 Symbol::delete_package "safe::$_" 2701 Symbol::delete_package "safe::$_"
2701 for qw(cf::attachable cf::object cf::object::player cf::client cf::player cf::map cf::party cf::region); 2702 for qw(cf::attachable cf::object cf::object::player cf::client cf::player cf::map cf::party cf::region);
2702 2703
2703 warn "unloading cf.pm \"a bit\""; 2704 warn "unloading cf.pm \"a bit\"";
2704 delete $INC{"cf.pm"}; 2705 delete $INC{"cf.pm"};
2706 delete $INC{"cf/pod.pm"};
2705 2707
2706 # don't, removes xs symbols, too, 2708 # don't, removes xs symbols, too,
2707 # and global variables created in xs 2709 # and global variables created in xs
2708 #Symbol::delete_package __PACKAGE__; 2710 #Symbol::delete_package __PACKAGE__;
2709 2711

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines