Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jacco.braat [...] tno.nl
Cc:
AdminCc:

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



Subject: Net-Dbus-0.33.4
Date: Mon, 16 Jul 2007 14:20:00 +0200
To: <bug-Net-DBus [...] rt.cpan.org>
From: "Braat, J.A. (Jacco)" <jacco.braat [...] tno.nl>
Hello, i think there is a problem with handling of the "magic" variable. For example: dbus_method("name", ["caller","int16"],[]); sub name { my ($self, $caller, $i) = @_; } $i is undefined because in Introspector.pm -> decode() the iterator pops a value from the message even for the magic variables. The following change makes it work. Jacco. --- Introspector.pm Sun Nov 5 22:47:57 2006 +++ /usr/local/lib/perl5/site_perl/5.8.8/mach/Net/DBus/Binding/Introspector. pm Mon Jul 16 13:53:11 2007 @@ -1047,16 +1047,25 @@ my @rawtypes = $self->_convert(@types); my @ret; - do { - my $type = shift @types; - my $rawtype = shift @rawtypes; + my $ttype; + my $rawtype; + while (defined($ttype = shift @types)) { + $rawtype = shift @rawtypes; - if (exists $magic_type_map{$type}) { - push @ret, &$rawtype($message); - } else { - push @ret, $iter->get($rawtype); + if (exists $magic_type_map{$ttype}) { + push @ret, &$rawtype($message); + } else { + push @ret, $iter->get($rawtype); + last unless ($iter->next); + } + } + while (defined($ttype = shift @types)) { + $rawtype = shift @rawtypes; + + if (exists $magic_type_map{$ttype}) { + push @ret, &$rawtype($message); + } } - } while ($iter->next); return @ret; } This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/disclaimer/email.html
Subject: Net-Dbus-0.33.4 magic value decoding
I have just uploaded a new release Net-DBus-0.33.5 which should resolve the problem with decoding magic values. The decode() method was re-written and test cases for magic values also added to try & validate correctness. Feel free to re-open this ticket if you still have problems with 0.33.5