Protocol::DBus::Client::Mojo - D-Bus with Mojolicious
use experimental 'signatures'; my $dbus = Protocol::DBus::Client::Mojo::system(); $dbus->initialize_p()->then( sub ($msgr) { my $a = $msgr->send_call_p( .. )->then( sub ($resp) { # .. } ); my $b = $msgr->send_call_p( .. )->then( sub ($resp) { # .. } ); return Mojo::Promise->all( $a, $b ); }, )->wait();
This module provides an interface between Mojo::IOLoop and Protocol::DBus::Client. It subclasses Protocol::DBus::Client::EventBase.
Mojolicious-based applications can use this module to interface easily with D-Bus.
This module exposes mostly the same interface as Protocol::DBus::Client::AnyEvent, except for a bit of “Mojo-specific” behavior:
Returned promises, both from initialize() and the messenger object’s send_call(), are instances of Mojo::Promise rather than Promise::ES6.
initialize()
send_call()
initialize_p() and send_call_p() exist as aliases for initialize() and send_call(), respectively.
initialize_p()
send_call_p()
This module’s interface is identical to that of Protocol::DBus::Client::AnyEvent. See that module for more details.
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.