use warnings;
use lib qw(lib);
use Transmission::Client;
+use Data::Dump qw(dump);
my $action = shift @ARGV or _help();
my %a = ( autodie => 1 );
@a{ qw(username password) } = split(/:/, $ENV{TR_AUTH}) if $ENV{TR_AUTH};
-print %a;
my $tc = Transmission::Client->new( %a );
printf "%3s %-34s %4s %4s %5s %5s\n", 'id', 'name', 'lcrs', 'sdrs', 'rate', 'eta';
print "-" x 79, "\n";
for my $torrent ($tc->read_torrents) {
+ warn dump($torrent) if $ENV{DEBUG};
printf "%3i %-34s %4s %4s %5s %5s\n",
$torrent->id,
substr($torrent->name, 0, 34),