… | |
… | |
56 | modules is loaded: Coro::Event, Event, Glib, Tk. The first one found is |
56 | modules is loaded: Coro::Event, Event, Glib, Tk. The first one found is |
57 | used. If none is found, the module tries to load these modules in the |
57 | used. If none is found, the module tries to load these modules in the |
58 | order given. The first one that could be successfully loaded will be |
58 | order given. The first one that could be successfully loaded will be |
59 | used. If still none could be found, it will issue an error. |
59 | used. If still none could be found, it will issue an error. |
60 | |
60 | |
|
|
61 | SUPPLYING YOUR OWN EVENT MODEL INTERFACE |
|
|
62 | If you need to support another event library which isn't directly |
|
|
63 | supported by AnyEvent, you can supply your own interface to it by |
|
|
64 | pushing, before the first watch gets created, the package name of the |
|
|
65 | event module and the package name of the interface to use onto |
|
|
66 | @AnyEvent::REGISTRY. You can do that before and even without loading |
|
|
67 | AnyEvent. |
|
|
68 | |
|
|
69 | Example: |
|
|
70 | |
|
|
71 | push @AnyEvent::REGISTRY, [urxvt => urxvt::anyevent::]; |
|
|
72 | |
|
|
73 | This tells AnyEvent to (literally) use the "urxvt::anyevent::" module |
|
|
74 | when it finds the "urxvt" module is loaded. When AnyEvent is loaded and |
|
|
75 | requested to find a suitable event model, it will first check for the |
|
|
76 | urxvt module. |
|
|
77 | |
|
|
78 | The above isn't fictitious, the *rxvt-unicode* (a.k.a. urxvt) uses the |
|
|
79 | above line exactly. An interface isn't included in AnyEvent because it |
|
|
80 | doesn't make sense outside the embedded interpreter inside |
|
|
81 | *rxvt-unicode*, and it is updated and maintained as part of the |
|
|
82 | *rxvt-unicode* distribution. |
|
|
83 | |
61 | ENVIRONMENT VARIABLES |
84 | ENVIRONMENT VARIABLES |
62 | The following environment variables are used by this module: |
85 | The following environment variables are used by this module: |
63 | |
86 | |
64 | "PERL_ANYEVENT_VERBOSE" when set to 2 or higher, reports which event |
87 | "PERL_ANYEVENT_VERBOSE" when set to 2 or higher, reports which event |
65 | model gets used. |
88 | model gets used. |