Index: /trunk/Nebulous-Server/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 5503)
+++ /trunk/Nebulous-Server/lib/Nebulous/Server.pm	(revision 5504)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.16 2005-11-10 21:57:15 jhoblitt Exp $
+# $Id: Server.pm,v 1.17 2005-11-10 22:07:53 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -90,4 +90,8 @@
         {
             type        => SCALAR,
+            callbacks   => {
+                # check that the comment isn't too long
+                'comment length' => sub { length $_[0] < 256 },
+            },
             optional    => 1,
         },
@@ -99,6 +103,4 @@
     # add hooks to make this decision based on avaiable space
     $volume = _get_storage_volume( $volume );
-
-    # check that the comment isn't too long
 
     my $uri;
Index: /trunk/Nebulous-Server/t/03_server_create_object.t
===================================================================
--- /trunk/Nebulous-Server/t/03_server_create_object.t	(revision 5503)
+++ /trunk/Nebulous-Server/t/03_server_create_object.t	(revision 5504)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.9 2005-11-10 21:53:56 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.10 2005-11-10 22:07:53 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 13;
+use Test::More tests => 14;
 
 use lib qw( ./t ./lib );
@@ -90,4 +90,11 @@
 
 eval {
+    $neb->create_object( 1, 0, 'node01', 'x' x 256 );
+};
+like( $@, qr/comment length/, "comment is too long" );
+
+Test::Nebulous->setup;
+
+eval {
     $neb->create_object();
 };
Index: /trunk/Nebulous/lib/Nebulous/Server.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 5503)
+++ /trunk/Nebulous/lib/Nebulous/Server.pm	(revision 5504)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004  Joshua Hoblitt
 #
-# $Id: Server.pm,v 1.16 2005-11-10 21:57:15 jhoblitt Exp $
+# $Id: Server.pm,v 1.17 2005-11-10 22:07:53 jhoblitt Exp $
 
 package Nebulous::Server;
@@ -90,4 +90,8 @@
         {
             type        => SCALAR,
+            callbacks   => {
+                # check that the comment isn't too long
+                'comment length' => sub { length $_[0] < 256 },
+            },
             optional    => 1,
         },
@@ -99,6 +103,4 @@
     # add hooks to make this decision based on avaiable space
     $volume = _get_storage_volume( $volume );
-
-    # check that the comment isn't too long
 
     my $uri;
Index: /trunk/Nebulous/t/03_server_create_object.t
===================================================================
--- /trunk/Nebulous/t/03_server_create_object.t	(revision 5503)
+++ /trunk/Nebulous/t/03_server_create_object.t	(revision 5504)
@@ -3,10 +3,10 @@
 # Copryight (C) 2004-2005  Joshua Hoblitt
 #
-# $Id: 03_server_create_object.t,v 1.9 2005-11-10 21:53:56 jhoblitt Exp $
+# $Id: 03_server_create_object.t,v 1.10 2005-11-10 22:07:53 jhoblitt Exp $
 
 use strict;
 use warnings FATAL => qw( all );
 
-use Test::More tests => 13;
+use Test::More tests => 14;
 
 use lib qw( ./t ./lib );
@@ -90,4 +90,11 @@
 
 eval {
+    $neb->create_object( 1, 0, 'node01', 'x' x 256 );
+};
+like( $@, qr/comment length/, "comment is too long" );
+
+Test::Nebulous->setup;
+
+eval {
     $neb->create_object();
 };
