Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: dreamind [...] dreamind.de
Cc:
AdminCc:

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



Subject: Net::DBus::Exporter
Date: Tue, 07 Apr 2009 11:04:28 +0200
To: bug-Net-DBus [...] rt.cpan.org
From: Stefan Pfetzing <dreamind [...] dreamind.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, it seems the regular expression in Net::DBus::Inspector is not concurrent with the error message. I would like to use "com.1and1.Something" as interface name, but its being rejected by Net::DBus::Exporter. IMHO the regex should be corrected to allow [0-9] and _ too. At least [0-9] for the second part of the reverse domain, like as in com.1and1. Thanks. Greetings, Stefan - -- http://www.dreamind.de/ Oroborus and Debian GNU/Linux Developer. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAknbFxwACgkQi50xCpfDmMtNywCglG8H+mqpgh7em6pYq/I1gUZ6 LQAAni/2f1OHncl4WXxuNZqj05rIr69Q =F+9R -----END PGP SIGNATURE-----
On Tue Apr 07 05:04:53 2009, dreamind wrote: Show quoted text
> > I would like to use "com.1and1.Something" as interface name, but its > being > rejected by Net::DBus::Exporter. > > IMHO the regex should be corrected to allow [0-9] and _ too. At least > [0-9] for > the second part of the reverse domain, like as in com.1and1.
Unfortunately I don't have control over what's allowed - the Perl bindings are just applying the rules defined in the DBus specification, which does not allow for a leading digit in a component of the interface names. If I didn't check this in the Perl layer, then the underlying libdbus.so would call abort() when it saw the non-compliant interface name http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names # Interface names are composed of 1 or more elements separated by a period ('.') character. All elements must contain at least one character. # Each element must only contain the ASCII characters "[A-Z][a-z][0-9]_" and must not begin with a digit. # Interface names must contain at least one '.' (period) character (and thus at least two elements). # Interface names must not begin with a '.' (period) character. The regex is /^[a-zA-Z]\w*(\.[a-zA-Z]\w*)+$/ The '\w' allows use of '_', though the spec does leave open the possibility that a '_' can be used as the first letter of a element, so I should tweak the character classes to '[a-zA-Z_]'. I can't allow 0-9 here though.
The 1.0.0 release fixes the regex to allow a leading underscore, and improved the error message so it details the exact DBus spec requirements for interface names.