X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FTak.pm;h=55bfc7f0eec430330cb56e8e53dc4aee6f5b3eef;hb=e937993be9115ddd063c8a4c51c8a0965930dcce;hp=2a7581bb2fb49ff1a7c5a75637173bcc62e53cd0;hpb=330ac6a2816a7d985014057aff3442546705e153;p=scpubgit%2FTak.git diff --git a/lib/Tak.pm b/lib/Tak.pm index 2a7581b..55bfc7f 100644 --- a/lib/Tak.pm +++ b/lib/Tak.pm @@ -3,7 +3,7 @@ package Tak; use Tak::Loop; use strictures 1; -our $VERSION = '0.001002'; # 0.1.2 +our $VERSION = '0.001004'; # 0.1.4 our ($loop, $did_upgrade); @@ -49,10 +49,17 @@ sub await_all { =head1 NAME -Tak - Multi host remote control over ssh +Tak - Multi host remote control over ssh (then I wrote Object::Remote) =head1 SYNOPSIS + # Curse at mst for doing it again under a different name + # Curse at mst some more + $ cpanm Object::Remote + # Now go use that + +(sorry, I should've done a tombstone release ages back) + bin/tak -h user1@host1 -h user2@host2 exec cat /etc/hostname or @@ -85,6 +92,43 @@ A drink leaked in my bag on the way back from LPW. My laptop is finally alive again though so I'll try and turn my slides into a vague attempt at documentation while I'm traveling to/from christmas things. +=head1 Example + +$ cat Takfile +package Tak::MyScript; + +use strict; +use warnings; + +use Tak::Takfile; +use Tak::ObjectClient; +use lib "./lib"; + +sub each_host { + my ($self, $remote) = @_; + + my $oc = Tak::ObjectClient->new(remote => $remote); + my $name = $oc->new_object('My::Hostname'); + print "Connected to hostname: " . $name . "\n"; + } + +1; + +----- + +$cat ./lib/My/Hostname +package My::Hostname; + +use Sys::Hostname; + +sub new { + my ($self) = @_; + my $name = hostname; + return $name; + } + +1; + =head1 AUTHOR mst - Matt S. Trout (cpan:MSTROUT)