[libnet-dbus-perl] 268/335: Added example script for dumping introspection XML
Intrigeri
intrigeri at moszumanska.debian.org
Sat Mar 21 01:08:08 UTC 2015
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 2bbe1a22ae58aa03e17efdf68192377b917480c6
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Wed Feb 20 19:25:36 2008 -0500
Added example script for dumping introspection XML
---
examples/dump-object-xml.pl | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/examples/dump-object-xml.pl b/examples/dump-object-xml.pl
new file mode 100644
index 0000000..1768052
--- /dev/null
+++ b/examples/dump-object-xml.pl
@@ -0,0 +1,23 @@
+#!/usr/bin/perl
+
+use warnings;
+use strict;
+
+use Net::DBus;
+use Net::DBus::Dumper;
+use Carp qw(confess);
+
+$SIG{__DIE__} = sub {confess $_[0] };
+
+my $bus = Net::DBus->find;
+
+if (int(@ARGV) != 2) {
+ die "syntax: $0 SERVICE OBJECT";
+}
+
+my $service = $bus->get_service(shift @ARGV);
+my $object = $service->get_object(shift @ARGV);
+my $xml = $object->_introspector->format();
+print $xml, "\n";
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git
More information about the Pkg-perl-cvs-commits
mailing list