[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 08 Jun 2006 20:53:35 -0000


albertel		Thu Jun  8 16:53:35 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - documenting newput
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.747 loncom/lonnet/perl/lonnet.pm:1.748
--- loncom/lonnet/perl/lonnet.pm:1.747	Wed Jun  7 17:38:25 2006
+++ loncom/lonnet/perl/lonnet.pm	Thu Jun  8 16:53:34 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.747 2006/06/07 21:38:25 albertel Exp $
+# $Id: lonnet.pm,v 1.748 2006/06/08 20:53:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7565,6 +7565,31 @@
 
 =item *
 
+newput($namespace,$storehash,$udom,$uname) :
+
+Attempts to store the items in the $storehash, but only if they don't
+currently exist, if this succeeds you can be certain that you have 
+successfully created a new key value pair in the $namespace db.
+
+
+Args:
+ $namespace: name of database to store values to
+ $storehash: hashref to store to the db
+ $udom: (optional) domain of user containing the db
+ $uname: (optional) name of user caontaining the db
+
+Returns:
+ 'ok' -> succeeded in storing all keys of $storehash
+ 'key_exists: <key>' -> failed to anything out of $storehash, as at
+                        least <key> already existed in the db (other
+                        requested keys may also already exist)
+ 'error: <msg>' -> unable to tie the DB or other erorr occured
+ 'con_lost' -> unable to contact request server
+ 'refused' -> action was not allowed by remote machine
+
+
+=item *
+
 eget($namespace,$storearr,$udom,$uname) : returns hash with keys from array
 reference filled in from namesp (encrypts the return communication)
 ($udom and $uname are optional)