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.71 by root, Sun Oct 1 10:59:30 2006 UTC vs.
Revision 1.72 by root, Sun Oct 1 11:41:37 2006 UTC

5use Storable; 5use Storable;
6use Opcode; 6use Opcode;
7use Safe; 7use Safe;
8use Safe::Hole; 8use Safe::Hole;
9 9
10use YAML::Syck ();
10use Time::HiRes; 11use Time::HiRes;
11use Event; 12use Event;
12$Event::Eval = 1; # no idea why this is required, but it is 13$Event::Eval = 1; # no idea why this is required, but it is
14
15# work around bug in YAML::Syck - bad news for perl6, will it be as broken wrt. unicode?
16$YAML::Syck::ImplicitUnicode = 1;
13 17
14use strict; 18use strict;
15 19
16_init_vars; 20_init_vars;
17 21
1025} 1029}
1026 1030
1027############################################################################# 1031#############################################################################
1028# the server's main() 1032# the server's main()
1029 1033
1034sub load_cfg {
1035 open my $fh, "<:utf8", cf::confdir . "/config"
1036 or return;
1037
1038 local $/;
1039 *CFG = YAML::Syck::Load <$fh>;
1040
1041 use Data::Dumper; warn Dumper \%CFG;
1042}
1043
1030sub main { 1044sub main {
1045 load_cfg;
1031 db_load; 1046 db_load;
1032 load_extensions; 1047 load_extensions;
1033 Event::loop; 1048 Event::loop;
1034} 1049}
1035 1050

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines