query rtorrent status over socket
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 27 Aug 2011 00:23:29 +0000 (00:23 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 27 Aug 2011 00:24:46 +0000 (00:24 +0000)
torrent/rtorrent-dump.pl [new file with mode: 0755]

diff --git a/torrent/rtorrent-dump.pl b/torrent/rtorrent-dump.pl
new file mode 100755 (executable)
index 0000000..79eb1f3
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+use RTPG;
+use Data::Dump qw(dump);
+
+my $h = new RTPG(url=>'/tmp/rtorrent.socket');
+
+# arrayref and error (standard version)
+my ($tlist, $error)=$h->torrents_list;
+print dump( $tlist, $error );