Index: /trunk/Nebulous/Changes
===================================================================
--- /trunk/Nebulous/Changes	(revision 17642)
+++ /trunk/Nebulous/Changes	(revision 17643)
@@ -2,4 +2,5 @@
 
 0.09
+    - modernize neb-touch API calls
     - change Nebulous::Client->replicate() to check the md5sum of the
       replicated file and to not leave empty instances laying around if there
Index: /trunk/Nebulous/bin/neb-touch
===================================================================
--- /trunk/Nebulous/bin/neb-touch	(revision 17642)
+++ /trunk/Nebulous/bin/neb-touch	(revision 17643)
@@ -3,5 +3,5 @@
 # Copyright (C) 2007-2008  Joshua Hoblitt
 #
-# $Id: neb-touch,v 1.7 2008-01-25 20:54:04 jhoblitt Exp $
+# $Id: neb-touch,v 1.8 2008-05-13 00:09:06 jhoblitt Exp $
 
 use strict;
@@ -25,5 +25,5 @@
 ) || pod2usage( 2 );
 
-my $file = shift;
+my $key = shift;
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
@@ -31,5 +31,5 @@
     unless $server;
 pod2usage( -msg => "missing file operand", exitval => 2 )
-    unless defined $file;
+    unless defined $key;
 
 my $neb = Nebulous::Client->new(
@@ -40,12 +40,7 @@
     unless defined $neb;
 
-unless (scalar @{$neb->find_objects($file)}) {
-    if (defined $volume) {
-        $neb->create($file, $volume)
-            or die "failed to create Nebulous key $file";
-    } else {
-        $neb->create($file)
-            or die "failed to create Nebulous key $file";
-    }
+unless ($neb->stat($key)) {
+    my $fh = $neb->create($key, $volume)
+        or die "failed to create Nebulous key: $key";
 }
 
