… | |
… | |
119 | The interface itself is vaguely similar, but not identical to the L<Event> |
119 | The interface itself is vaguely similar, but not identical to the L<Event> |
120 | module. |
120 | module. |
121 | |
121 | |
122 | During the first call of any watcher-creation method, the module tries |
122 | During the first call of any watcher-creation method, the module tries |
123 | to detect the currently loaded event loop by probing whether one of the |
123 | to detect the currently loaded event loop by probing whether one of the |
124 | following modules is already loaded: L<EV>, |
124 | following modules is already loaded: L<EV>, L<AnyEvent::Impl::Perl>, |
125 | L<Event>, L<Glib>, L<AnyEvent::Impl::Perl>, L<Tk>, L<Event::Lib>, L<Qt>, |
125 | L<Event>, L<Glib>, L<Tk>, L<Event::Lib>, L<Qt>, L<POE>. The first one |
126 | L<POE>. The first one found is used. If none are found, the module tries |
126 | found is used. If none are detected, the module tries to load the first |
127 | to load these modules (excluding Tk, Event::Lib, Qt and POE as the pure perl |
127 | four modules in the order given; but note that if L<EV> is not |
128 | adaptor should always succeed) in the order given. The first one that can |
128 | available, the pure-perl L<AnyEvent::Impl::Perl> should always work, so |
129 | be successfully loaded will be used. If, after this, still none could be |
129 | the other two are not normally tried. |
130 | found, AnyEvent will fall back to a pure-perl event loop, which is not |
|
|
131 | very efficient, but should work everywhere. |
|
|
132 | |
130 | |
133 | Because AnyEvent first checks for modules that are already loaded, loading |
131 | Because AnyEvent first checks for modules that are already loaded, loading |
134 | an event model explicitly before first using AnyEvent will likely make |
132 | an event model explicitly before first using AnyEvent will likely make |
135 | that model the default. For example: |
133 | that model the default. For example: |
136 | |
134 | |