Net::DBus::Annotation(3pm)

Net::DBus::Annotation3pm

Annotations for changing behaviour of apis

Usage

  use Net::DBus::Annotation qw(:call);
  my $object = $service->get_object("/org/example/systemMonitor");
  # Block until processes are listed
  my $processes = $object->list_processes("someuser");
  # Just throw away list of processes, pretty pointless
  # in this example, but useful if the method doesn't have
  # a return value
  $object->list_processes(dbus_call_noreply, "someuser");
  # List processes & get on with other work until
  # the list is returned.
  my $asyncreply = $object->list_processes(dbus_call_async, "someuser");
  ... some time later...
  my $processes = $asyncreply->get_data;
  # List processes, with a shorter 10 second timeout, instead of
  # the default 60 seconds
  my $object->list_processes(dbus_call_timeout, 10 * 1000, "someuser");

Overview

This module provides a number of annotations which will be useful when dealing with the DBus APIs. There are annotations for switching remote calls between sync, async and no-reply mode. More annotations may be added over time.

Methods

dbus_call_sync

Requests that a method call be performed synchronously, waiting for the reply or error return to be received before continuing.

dbus_call_async

Requests that a method call be performed a-synchronously, returning a pending call object, which will collect the reply when it eventually arrives.

dbus_call_noreply

Requests that a method call be performed a-synchronously, discarding any possible reply or error message.

dbus_call_timeout

Indicates that the next parameter for the method call will specify the time to wait for a reply in milliseconds. If omitted, then the default timeout for the object will be used

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Author

Daniel Berrange <[email protected]>

From perl-net-dbus 1.2.0-9 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.