… | |
… | |
38 | Net::DBus unfortunately has no nice hooking API. |
38 | Net::DBus unfortunately has no nice hooking API. |
39 | |
39 | |
40 | However, unlike L<Net::DBus::Reactor>, this module should be fully |
40 | However, unlike L<Net::DBus::Reactor>, this module should be fully |
41 | non-blocking as long as you only use non-blocking APIs (Net::DBus::Reactor |
41 | non-blocking as long as you only use non-blocking APIs (Net::DBus::Reactor |
42 | blocks on writes). It should also be faster, but Net::DBus is such a |
42 | blocks on writes). It should also be faster, but Net::DBus is such a |
43 | morass so unneeded method calls that speed won't matter much... |
43 | morass of unneeded method calls that speed won't matter much... |
44 | |
44 | |
45 | =head2 EXAMPLE |
45 | =head2 EXAMPLE |
46 | |
46 | |
47 | Here is a simple example. Both work with AnyEvent::DBus and do the same |
47 | Here is a simple example. Both work with AnyEvent::DBus and do the same |
48 | thing, but only the second is actually non-blocking. |
48 | thing, but only the second is actually non-blocking. |
… | |
… | |
90 | |
90 | |
91 | use AnyEvent (); |
91 | use AnyEvent (); |
92 | use Net::DBus (); |
92 | use Net::DBus (); |
93 | use Net::DBus::Binding::Watch (); |
93 | use Net::DBus::Binding::Watch (); |
94 | |
94 | |
95 | our $VERSION = '0.3'; |
95 | our $VERSION = '0.31'; |
96 | |
96 | |
97 | # yup, Net::DBus checks by using exists on %INC... |
97 | # yup, Net::DBus checks by using exists on %INC... |
98 | $INC{'Net/DBus/Reactor.pm'} = undef; |
98 | $INC{'Net/DBus/Reactor.pm'} = undef; |
99 | |
99 | |
100 | # claim we are the main reactor mainloop |
100 | # claim we are the main reactor mainloop |