Protocol::DBus::Message
This class encapsulates a single DBus message. You generally should not instantiate it directly.
$NAME is, e.g., PATH or the value of the corresponding member of Protocol::DBus::Message::Header::FIELD().
PATH
Protocol::DBus::Message::Header::FIELD()
Always returned as an array reference or undef. See below about mapping between D-Bus and Perl.
Returns a number. Cross-reference with the D-Bus specification.
Convenience method; $NAME is, e.g., METHOD_CALL.
METHOD_CALL
Convenience method; indicates whether all of the given @NAMES (e.g., NO_AUTO_START) correspond to flags that are set in the message.
NO_AUTO_START
Returns a number.
Numeric and string types are represented as plain Perl scalars.
UNIX_FDs are normally represented as Perl filehandle objects. If Protocol::DBus receives a UNIX_FD that doesn’t correspond to a received file descriptor, the UNIX_FD will be represented as the number passed in the raw D-Bus message, and a warning is thrown.
By default, variant signatures are discarded, and the values are given by themselves. See Protocol::DBus::Peer’s preserve_variant_signatures() if you need an alternative mapping method that preserves the signatures.
preserve_variant_signatures()
Other containers are represented as blessed references: Protocol::DBus::Type::Dict, Protocol::DBus::Type::Array, and Protocol::DBus::Type::Struct. Currently these are just plain hash and array references that are bless()ed; i.e., the classes themselves have no methods defined (and aren’t even defined Perl namespaces).
Protocol::DBus::Type::Dict
Protocol::DBus::Type::Array
Protocol::DBus::Type::Struct
Use plain Perl scalars to represent all numeric and string types.
Use plain Perl filehandle objects to represent UNIX_FDs.
Use array references to represent D-Bus arrays and structs. Use hash references for dicts.
Use a two-member array reference—signature then value—to represent a D-Bus variant. (Note the inconsistency with the reverse mapping.)
s(s) - ( $s0, [ $s1 ] )
s(s)
( $s0, [ $s1 ] )
a(s) - ( \@ss )
a(s)
( \@ss )
a{ss} - ( \%ss )
a{ss}
( \%ss )
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.