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 d2d9256c569b9393729187941063e416cbd94410 Author: Daniel P. Berrange <d...@berrange.com> Date: Mon Aug 22 12:30:29 2005 +0000 Added support for services & buses --- examples/dump-object.pl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/dump-object.pl b/examples/dump-object.pl index 9158e3a..7aaab09 100644 --- a/examples/dump-object.pl +++ b/examples/dump-object.pl @@ -2,14 +2,22 @@ use Net::DBus; use Net::DBus::Dumper; +use Carp qw(confess); + +$SIG{__DIE__} = sub {confess $_[0] }; my $bus = Net::DBus->find; -if ($#ARGV != 1) { - die "syntax: $0 SERVICE-NAME OBJECT-PATH\n"; +if (@ARGV) { + my $service = $bus->get_service(shift @ARGV); + + if (@ARGV) { + my $object = $service->get_object(shift @ARGV); + print dbus_dump($object); + } else { + print dbus_dump($service); + } +} else { + print dbus_dump($bus); } -my $service = $bus->get_service($ARGV[0]); -my $object = $service->get_object($ARGV[1]); - -print dbus_dump($object); -- 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