6 our $VERSION = '0.001001'; # 0.1.1
10 sub loop { $loop ||= Tak::Loop->new }
13 my ($class, $done) = @_;
15 my $loop = $class->loop;
16 $loop->loop_once until $_[1];
20 my ($class, @requests) = @_;
21 @requests = grep !$_->is_done, @requests;
22 return unless @requests;
23 my %req = map +("$_" => "$_"), @requests;
26 my $orig = $_->{on_result};
28 ($_ => sub { delete $req{$tag}; $orig->(@_); $done = 1 unless keys %req; })
30 my $call = sub { $class->loop_until($done) };
34 $call = sub { local $req->{on_result} = $on_r{$req}; $inner->() };
44 Tak - Multi host remote control over ssh
48 bin/tak -h user1@host1 -h user2@host2 exec cat /etc/hostname
54 package Tak::MyScript;
57 use Tak::ObjectClient;
59 sub each_get_homedir {
60 my ($self, $remote) = @_;
61 my $oc = Tak::ObjectClient->new(remote => $remote);
62 my $home = $oc->new_object('Path::Class::Dir')->absolute->stringify;
64 $remote->host.': '.$home."\n"
72 tak -h something get-homedir
74 =head1 WHERE'S THE REST?
76 A drink leaked in my bag on the way back from LPW. You'll get more once I
77 get my laptop's drive into an enclosure and decant the slides.
81 mst - Matt S. Trout (cpan:MSTROUT) <mst@shadowcat.co.uk>
85 None required yet. Maybe this module is perfect (hahahahaha ...).
89 Copyright (c) 2011 the strictures L</AUTHOR> and L</CONTRIBUTORS>
94 This library is free software and may be distributed under the same terms