… | |
… | |
1030 | If you want to sprinkle loads of logging calls around your code, |
1030 | If you want to sprinkle loads of logging calls around your code, |
1031 | consider creating a logger callback with the "AnyEvent::Log::logger" |
1031 | consider creating a logger callback with the "AnyEvent::Log::logger" |
1032 | function, which can reduce typing, codesize and can reduce the |
1032 | function, which can reduce typing, codesize and can reduce the |
1033 | logging overhead enourmously. |
1033 | logging overhead enourmously. |
1034 | |
1034 | |
|
|
1035 | AnyEvent::fh_block $filehandle |
|
|
1036 | AnyEvent::fh_unblock $filehandle |
|
|
1037 | Sets blocking or non-blocking behaviour for the given filehandle. |
|
|
1038 | |
1035 | WHAT TO DO IN A MODULE |
1039 | WHAT TO DO IN A MODULE |
1036 | As a module author, you should "use AnyEvent" and call AnyEvent methods |
1040 | As a module author, you should "use AnyEvent" and call AnyEvent methods |
1037 | freely, but you should not load a specific event module or rely on it. |
1041 | freely, but you should not load a specific event module or rely on it. |
1038 | |
1042 | |
1039 | Be careful when you create watchers in the module body - AnyEvent will |
1043 | Be careful when you create watchers in the module body - AnyEvent will |