Index: trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pm	(revision 20094)
+++ trunk/Nebulous/lib/Nebulous/Client.pm	(revision 20965)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.62 2008-10-13 21:20:33 jhoblitt Exp $
+# $Id: Client.pm,v 1.63 2008-12-12 21:13:41 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -243,5 +243,5 @@
         # if the copy failed we now have a zero length instances floating
         # around that must be removed
-        unless ($self->delete_instance("$uri")) {
+        unless ($self->delete_instance($key, "$uri")) {
             $log->logdie( "can not copy instance $uri AND FAILED TO CLEANUP EMPTY INSTANCE" );
         }
@@ -256,5 +256,5 @@
 
     unless ($src_md5 eq $dst_md5) {
-        $self->delete_instance("$uri");
+        $self->delete_instance($key, "$uri");
         $log->logdie( "md5sum mismatch" );
     }
@@ -327,5 +327,5 @@
     }
 
-    my $uri = $self->delete_instance( @$locations[0] );
+    my $uri = $self->delete_instance($key, @$locations[0]);
 
     $log->debug("leaving");
@@ -813,5 +813,5 @@
     # a lock is implicitly removed when the last storage object is deleted
     foreach my $uri ( @$locations ) {
-        $self->delete_instance( $uri ) or return undef;
+        $self->delete_instance($key, $uri) or return undef;
     }
 
@@ -944,5 +944,8 @@
     my $self = shift;
 
-    my ($uri) = validate_pos(@_,
+    my ($key, $uri) = validate_pos(@_,
+        {
+            type => SCALAR,
+        },
         {
             type => SCALAR,
@@ -961,5 +964,5 @@
     $log->logdie( $@ ) if $@;
 
-    my $response = $self->{ 'server' }->delete_instance( $uri );
+    my $response = $self->{ 'server' }->delete_instance($key, $uri);
     if ( $response->fault ) {
         $self->set_err($response->faultstring);
