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.392 by root, Fri Oct 26 04:44:54 2007 UTC vs.
Revision 1.395 by root, Sat Nov 10 22:41:59 2007 UTC

162 162
163The raw value load value from the last tick. 163The raw value load value from the last tick.
164 164
165=item %cf::CFG 165=item %cf::CFG
166 166
167Configuration for the server, loaded from C</etc/crossfire/config>, or 167Configuration for the server, loaded from C</etc/deliantra-server/config>, or
168from wherever your confdir points to. 168from wherever your confdir points to.
169 169
170=item cf::wait_for_tick, cf::wait_for_tick_begin 170=item cf::wait_for_tick, cf::wait_for_tick_begin
171 171
172These are functions that inhibit the current coroutine one tick. cf::wait_for_tick_begin only 172These are functions that inhibit the current coroutine one tick. cf::wait_for_tick_begin only
406 406
407BEGIN { *async = \&Coro::async_pool } 407BEGIN { *async = \&Coro::async_pool }
408 408
409=item cf::sync_job { BLOCK } 409=item cf::sync_job { BLOCK }
410 410
411The design of Crossfire TRT requires that the main coroutine ($Coro::main) 411The design of Deliantra requires that the main coroutine ($Coro::main)
412is always able to handle events or runnable, as Crossfire TRT is only 412is always able to handle events or runnable, as Deliantra is only
413partly reentrant. Thus "blocking" it by e.g. waiting for I/O is not 413partly reentrant. Thus "blocking" it by e.g. waiting for I/O is not
414acceptable. 414acceptable.
415 415
416If it must be done, put the blocking parts into C<sync_job>. This will run 416If it must be done, put the blocking parts into C<sync_job>. This will run
417the given BLOCK in another coroutine while waiting for the result. The 417the given BLOCK in another coroutine while waiting for the result. The
662attach callbacks/event handlers (a collection of which is called an "attachment") 662attach callbacks/event handlers (a collection of which is called an "attachment")
663to it. All such attachable objects support the following methods. 663to it. All such attachable objects support the following methods.
664 664
665In the following description, CLASS can be any of C<global>, C<object> 665In the following description, CLASS can be any of C<global>, C<object>
666C<player>, C<client> or C<map> (i.e. the attachable objects in 666C<player>, C<client> or C<map> (i.e. the attachable objects in
667Crossfire TRT). 667Deliantra).
668 668
669=over 4 669=over 4
670 670
671=item $attachable->attach ($attachment, key => $value...) 671=item $attachable->attach ($attachment, key => $value...)
672 672
1548 1548
1549Expand crossfire pod fragments into protocol xml. 1549Expand crossfire pod fragments into protocol xml.
1550 1550
1551=cut 1551=cut
1552 1552
1553 use re 'eval'; 1553use re 'eval';
1554 1554
1555my $group; 1555my $group;
1556my $interior; $interior = qr{ 1556my $interior; $interior = qr{
1557 # match a pod interior sequence sans C<< >>
1557 (?: 1558 (?:
1558 \ (.*?)\ (?{ $group = $^N }) 1559 \ (.*?)\ (?{ $group = $^N })
1559 | < (??{$interior}) > 1560 | < (??{$interior}) >
1560 ) 1561 )
1561}x; 1562}x;
1626 s/\n+$//; # ending lines 1627 s/\n+$//; # ending lines
1627 } 1628 }
1628 1629
1629 $xml 1630 $xml
1630} 1631}
1632
1633no re 'eval';
1631 1634
1632sub hintmode { 1635sub hintmode {
1633 $_[0]{hintmode} = $_[1] if @_ > 1; 1636 $_[0]{hintmode} = $_[1] if @_ > 1;
1634 $_[0]{hintmode} 1637 $_[0]{hintmode}
1635} 1638}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines