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 b30c2be48648f26d1d1060b00257670ec2b8ca9c
Author: Daniel P. Berrange <d...@berrange.com>
Date:   Sat Oct 15 13:24:10 2005 +0000

    Example for listing HAL devices
---
 examples/lshal.pl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/examples/lshal.pl b/examples/lshal.pl
new file mode 100644
index 0000000..e2c7d25
--- /dev/null
+++ b/examples/lshal.pl
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+
+use strict;
+use Net::DBus;
+
+my $bus = Net::DBus->system;
+
+# Get a handle to the HAL service
+my $hal = $bus->get_service("org.freedesktop.Hal");
+
+# Get the device manager
+my $manager = $hal->get_object("/org/freedesktop/Hal/Manager", 
"org.freedesktop.Hal.Manager");
+
+# List devices
+foreach my $dev (sort { $a cmp $b } @{$manager->GetAllDevices}) {
+    print $dev, "\n";
+}

-- 
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

Reply via email to