… | |
… | |
41 | package Coro::Event; |
41 | package Coro::Event; |
42 | |
42 | |
43 | BEGIN { eval { require warnings } && warnings->unimport ("uninitialized") } |
43 | BEGIN { eval { require warnings } && warnings->unimport ("uninitialized") } |
44 | |
44 | |
45 | use Carp; |
45 | use Carp; |
|
|
46 | no warnings; |
46 | |
47 | |
47 | use Coro; |
48 | use Coro; |
48 | use Event qw(loop unloop); # we are re-exporting this, cooool! |
49 | use Event qw(loop unloop); # we are re-exporting this, cooool! |
49 | |
50 | |
|
|
51 | use XSLoader; |
|
|
52 | |
50 | use base 'Exporter'; |
53 | use base Exporter::; |
51 | |
54 | |
52 | @EXPORT = qw(loop unloop sweep reschedule); |
55 | our @EXPORT = qw(loop unloop sweep reschedule); |
53 | |
56 | |
54 | BEGIN { |
57 | BEGIN { |
55 | $VERSION = 1.31; |
58 | our $VERSION = 1.5; |
56 | |
59 | |
57 | local $^W = 0; # avoid redefine warning for Coro::ready; |
60 | local $^W = 0; # avoid redefine warning for Coro::ready; |
58 | |
61 | XSLoader::load __PACKAGE__, $VERSION; |
59 | require DynaLoader; |
|
|
60 | push @ISA, 'DynaLoader'; |
|
|
61 | bootstrap Coro::Event $VERSION; |
|
|
62 | } |
62 | } |
63 | |
63 | |
64 | =item $w = Coro::Event->flavour(args...) |
64 | =item $w = Coro::Event->flavour(args...) |
65 | |
65 | |
66 | Create and return a watcher of the given type. |
66 | Create and return a watcher of the given type. |