Index: trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pm	(revision 20093)
+++ trunk/Nebulous/lib/Nebulous/Client.pm	(revision 20094)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.61 2008-10-13 20:54:49 jhoblitt Exp $
+# $Id: Client.pm,v 1.62 2008-10-13 21:20:33 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -907,4 +907,37 @@
 
 
+sub swap
+{
+    my $self = shift;
+
+    my ( $key1, $key2 ) = validate_pos( @_,
+        {
+            type => SCALAR,
+        },
+        {
+            type => SCALAR,
+        },
+    );
+
+    $log->debug( "entered - @_" );
+
+    my $response = $self->{ 'server' }->swap_objects( $key1, $key2 );
+    if ( $response->fault ) {
+        $self->set_err($response->faultstring);
+
+        if ($response->faultstring =~ /is valid object key/) {
+            $log->debug( "leaving" );
+            return;
+        }
+
+        $log->logdie("unhandled fault - ", $self->err);
+    }
+
+    $log->debug( "leaving" );
+
+    return 1;
+}
+
+
 sub delete_instance
 {
Index: trunk/Nebulous/lib/Nebulous/Client.pod
===================================================================
--- trunk/Nebulous/lib/Nebulous/Client.pod	(revision 20093)
+++ trunk/Nebulous/lib/Nebulous/Client.pod	(revision 20094)
@@ -30,4 +30,5 @@
     $neb->copy( "key", "new_key", "node01" );
     $neb->move( "key", "new_key" );
+    $neb->swap( "key1", "key2" );
     $neb->delete_instance( $uri );
     my $stats = $neb->stat( "key" );
@@ -349,4 +350,23 @@
 
 =item * new_key
+
+The destination object.
+
+=back
+
+Returns true on success or C<undef> on failure.
+
+
+=item * swap($key1, $key2)
+
+Atomically swaps the names of two storage objects.
+
+=over 4
+
+=item * key1
+
+The source object.
+
+=item * key2
 
 The destination object.
