doooooooom
[scpubgit/Tak.git] / lib / Tak.pm
index 2a7581b..55bfc7f 100644 (file)
@@ -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) <mst@shadowcat.co.uk>