| Net-DBus documentation | Contained in the Net-DBus distribution. |
Net::DBus::Binding::Value - Strongly typed data value
# Import the convenience functions
use Net::DBus qw(:typing);
# Call a method with passing an int32
$object->doit(dint32("3"));
This module provides a simple wrapper around a raw Perl value, associating an explicit DBus type with the value. This is used in cases where a client is communicating with a server which does not provide introspection data, but for which the basic data types are not sufficient. This class should not be used directly, rather the convenience functions in Net::DBus be called.
Creates a wrapper for the perl value $value marking it as having
the dbus data type $type. It is not neccessary to call this method
directly, instead the data typing methods in the Net::DBus object
should be used.
Returns the raw perl value wrapped by this object
Returns the dbus data type this value is marked as having
Daniel Berrange <dan@berrange.com>
Copyright 2004-2005 by Daniel Berrange
| Net-DBus documentation | Contained in the Net-DBus distribution. |
# -*- perl -*- # # Copyright (C) 2004-2006 Daniel P. Berrange # # This program is free software; You can redistribute it and/or modify # it under the same terms as Perl itself. Either: # # a) the GNU General Public License as published by the Free # Software Foundation; either version 2, or (at your option) any # later version, # # or # # b) the "Artistic License" # # The file "COPYING" distributed along with this file provides full # details of the terms and conditions of the two licenses.
package Net::DBus::Binding::Value; use strict; use warnings;
sub new { my $class = shift; my $self = []; $self->[0] = shift; $self->[1] = shift; bless $self, $class; return $self; }
sub value { my $self = shift; return $self->[1]; }
sub type { my $self = shift; return $self->[0]; } 1;