… | |
… | |
76 | package EV; |
76 | package EV; |
77 | |
77 | |
78 | use strict; |
78 | use strict; |
79 | |
79 | |
80 | BEGIN { |
80 | BEGIN { |
81 | our $VERSION = '0.02'; |
81 | our $VERSION = '0.03'; |
82 | use XSLoader; |
82 | use XSLoader; |
83 | XSLoader::load "EV", $VERSION; |
83 | XSLoader::load "EV", $VERSION; |
84 | } |
84 | } |
|
|
85 | |
|
|
86 | @EV::Io::ISA = "EV::Watcher"; |
|
|
87 | @EV::Time::ISA = "EV::Watcher"; |
|
|
88 | @EV::Timer::ISA = "EV::Time"; |
|
|
89 | @EV::Periodic::ISA = "EV::Time"; |
|
|
90 | @EV::Signal::ISA = "EV::Watcher"; |
|
|
91 | @EV::Idle::ISA = "EV::Watcher"; |
|
|
92 | @EV::Prepare::ISA = "EV::Watcher"; |
|
|
93 | @EV::Check::ISA = "EV::Watcher"; |
85 | |
94 | |
86 | =head1 BASIC INTERFACE |
95 | =head1 BASIC INTERFACE |
87 | |
96 | |
88 | =over 4 |
97 | =over 4 |
89 | |
98 | |
… | |
… | |
281 | |
290 | |
282 | Set the priority of the watcher to C<$priority> (0 <= $priority < $EV::NPRI). |
291 | Set the priority of the watcher to C<$priority> (0 <= $priority < $EV::NPRI). |
283 | |
292 | |
284 | =back |
293 | =back |
285 | |
294 | |
|
|
295 | =head1 THREADS |
|
|
296 | |
|
|
297 | Threads are not supported by this in any way. Perl pseudo-threads is evil |
|
|
298 | and must die. |
|
|
299 | |
286 | =head1 BUGS |
300 | =head1 BUGS |
287 | |
301 | |
288 | Lots. Libevent itself isn't well tested and rather buggy, and this module |
302 | Lots. Libevent itself isn't well tested and rather buggy, and this module |
289 | is quite new at the moment. |
303 | is quite new at the moment. |
290 | |
304 | |
… | |
… | |
300 | |
314 | |
301 | our $DIED = sub { |
315 | our $DIED = sub { |
302 | warn "EV: error in callback (ignoring): $@"; |
316 | warn "EV: error in callback (ignoring): $@"; |
303 | }; |
317 | }; |
304 | |
318 | |
305 | our $NPRI = 4; |
319 | init; |
306 | our $BASE = init; |
|
|
307 | priority_init $NPRI; |
|
|
308 | |
320 | |
309 | push @AnyEvent::REGISTRY, [EV => "EV::AnyEvent"]; |
321 | push @AnyEvent::REGISTRY, [EV => "EV::AnyEvent"]; |
310 | |
322 | |
311 | 1; |
323 | 1; |
312 | |
324 | |