File: dump-object.pl

package info (click to toggle)
libnet-dbus-perl 0.33.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 692 kB
  • ctags: 422
  • sloc: perl: 4,714; makefile: 50; sh: 34
file content (26 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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 (@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);
}