<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I found an issue with Net:DBus while trying to use it with one of my DBus services. My interface exports a property of type a(oo).<br><br></div>Trying to get and then set the property leads to an error:<br>

<br>use Net::DBus;<br>my $bus = Net::DBus->session;<br>my $service = $bus->get_service("com.example.endpoint");<br>my $object = $service->get_object("/object", "com.example.ComplexProp");<br>

my $prop = $object->complex_prop();<br>$object->complex_prop($prop);<br><br></div>Result: org.freedesktop.DBus.Error.InvalidSignature: property expects a different type<br><br></div>Using dbus-monitor, I noticed the method signature for Set was wrong, as props's type gets incorrectly guessed as an array of array of objects. Also, looking at Net:DBus:Intrspector::encode, I notice that introspection information is only fetched for the method signature. The proposed patch fetches property type information on calls to org.freedesktop.DBus.Properties::Set() and appends them to the variant type. I tested it for my case and it worked, and didn't seem to introduce regressions for simple properties (string). I also feel like this could be useful for other compound types.<br>

<div><div><br clear="all"><div><div><div><div><div>--<br>Nicolas Calderon</div>
</div></div></div></div></div></div></div>