Protocol::DBus::Client::AnyEvent - D-Bus with AnyEvent
The following creates a D-Bus connection, sends two messages, waits for their responses, then ends:
use experimental 'signatures'; my $dbus = Protocol::DBus::Client::AnyEvent::system(); my $cv = AnyEvent->condvar(); $dbus->initialize()->then( sub ($msgr) { my $a = $msgr->send_call( .. )->then( sub ($resp) { # .. } ); my $b = $msgr->send_call( .. )->then( sub ($resp) { # .. } ); return Promise::ES6->all( [$a, $b] ); }, )->finally($cv); $cv->recv();
This module provides an AnyEvent interface on top of Protocol::DBus::Client. It subclasses Protocol::DBus::Client::EventBase.
This module provides system() and login_session() functions that parallel their equivalents in Protocol::DBus::Client but return an instance of this class instead.
system()
login_session()
AnyEvent::DBus is an AnyEvent wrapper for Net::DBus.
To install Protocol::DBus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Protocol::DBus
CPAN shell
perl -MCPAN -e shell install Protocol::DBus
For more information on module installation, please visit the detailed CPAN module installation guide.