This is an automated email from the git hooks/post-receive script. intrigeri pushed a commit to branch experimental in repository libnet-dbus-perl.
commit 25408e9922f44b4346dbbf9ee63cc1c8a6a38fb4 Author: Daniel P. Berrange <d...@berrange.com> Date: Mon Dec 27 16:25:35 2004 +0000 Allow an address to be specified instead of well known bus name, for connections to remote buses --- lib/Net/DBus/Binding/Bus.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/Net/DBus/Binding/Bus.pm b/lib/Net/DBus/Binding/Bus.pm index 6afa44b..7acc098 100644 --- a/lib/Net/DBus/Binding/Bus.pm +++ b/lib/Net/DBus/Binding/Bus.pm @@ -15,13 +15,21 @@ sub new { my $proto = shift; my $class = ref($proto) || $proto; my %params = @_; - - my $connection = Net::DBus::Binding::Bus::_open(defined $params{type} ? $params{type} : confess "type parameter is required"); - + + my $connection; + if (defined $params{type}) { + $connection = Net::DBus::Binding::Bus::_open($params{type}); + } elsif (defined $params{address}) { + $connection = Net::DBus::Binding::Connection::_open($params{address}); + $connection->dbus_bus_register(); + } else { + confess "either type or address parameter is required"; + } + my $self = $class->SUPER::new(%params, connection => $connection); bless $self, $class; - + return $self; } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits