Skip Menu |

This queue is for tickets about the Net-DBus CPAN distribution.

Report information
The Basics
Id: 107466
Status: resolved
Priority: 0/
Queue: Net-DBus

People
Owner: Nobody in particular
Requestors: DJCOLLINS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Variant types not handled in MockConnection class
Attempting to return variant-typed data from a method on the MockConnection bus fails with the following exception: Unguessable compound type '118' ('v') Attached patch seems to fix it.
Subject: net-dbus-variant.patch
diff --git a/lib/Net/DBus/Test/MockIterator.pm b/lib/Net/DBus/Test/MockIterator.pm index 4130d00..dad9f0e 100644 --- a/lib/Net/DBus/Test/MockIterator.pm +++ b/lib/Net/DBus/Test/MockIterator.pm @@ -677,6 +677,8 @@ sub guess_type { $subtype = [ $self->guess_type(($value->value())[0]->[0]) ]; } elsif ($maintype == &Net::DBus::Binding::Message::TYPE_STRUCT) { $subtype = [ map { $self->guess_type($_) } @{($value->value())[0]} ]; + } elsif ($maintype == &Net::DBus::Binding::Message::TYPE_VARIANT) { + $subtype = $self->guess_type($value->value); } else { die "Unguessable compound type '$maintype' ('", chr($maintype), "')\n"; }
Your proposed fixed is added in commit 309d52f8df2b98896a010af98c5afb0db2839408 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon Dec 16 21:16:17 2019 +0000 Add guessing for variant types in mock iterator