Index: /trunk/Nebulous-Server/Changes
===================================================================
--- /trunk/Nebulous-Server/Changes	(revision 24303)
+++ /trunk/Nebulous-Server/Changes	(revision 24304)
@@ -2,4 +2,5 @@
 
 0.17
+    - add params checking to Nebulous::Key::parse_neb_key()
     - restrict creation/modification/remove of xattrs to the user.* namespace
     - add chmod_object() method
Index: /trunk/Nebulous-Server/lib/Nebulous/Key.pm
===================================================================
--- /trunk/Nebulous-Server/lib/Nebulous/Key.pm	(revision 24303)
+++ /trunk/Nebulous-Server/lib/Nebulous/Key.pm	(revision 24304)
@@ -27,5 +27,7 @@
 {
     my ($key, $volume) = @_;
-    return unless defined $key;
+
+    die "key param is not optional" unless defined $key;
+    die "too many params" if scalar @_ > 2;
 
     # white space is not allowed
Index: /trunk/Nebulous-Server/t/75_parse_neb_key.t
===================================================================
--- /trunk/Nebulous-Server/t/75_parse_neb_key.t	(revision 24303)
+++ /trunk/Nebulous-Server/t/75_parse_neb_key.t	(revision 24304)
@@ -10,5 +10,5 @@
 use Test::More;
 
-plan tests => 99;
+plan tests => 103;
 
 use lib qw( ./t ./lib );
@@ -322,2 +322,23 @@
 };
 like( $@, qr/requires a path/, "no path" );
+
+# params
+eval {
+    my $key = parse_neb_key();
+};
+like( $@, qr/key param is not optional/, "no params" );
+
+eval {
+    my $key = parse_neb_key(undef);
+};
+like( $@, qr/key param is not optional/, "key is undef" );
+
+eval {
+    my $key = parse_neb_key(undef, 'bar');
+};
+like( $@, qr/key param is not optional/, "key is undef" );
+
+eval {
+    my $key = parse_neb_key('foo', 'bar', 'foo');
+};
+like( $@, qr/too many params/, "too many params" );
