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

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 04 Mar 2006 06:03:31 -0000


albertel		Sat Mar  4 01:03:31 2006 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - adding a dumpstore wrapper for diferentiating between dumpt hashes that are store/restored to and ones that are put/get from
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.716 loncom/lonnet/perl/lonnet.pm:1.717
--- loncom/lonnet/perl/lonnet.pm:1.716	Fri Mar  3 23:25:31 2006
+++ loncom/lonnet/perl/lonnet.pm	Sat Mar  4 01:03:30 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.716 2006/03/04 04:25:31 albertel Exp $
+# $Id: lonnet.pm,v 1.717 2006/03/04 06:03:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2855,6 +2855,13 @@
    return %returnhash;
 }
 
+# --------------------------------------------------------- dumpstore interface
+
+sub dumpstore {
+   my ($namespace,$udomain,$uname,$regexp,$range)=@_;
+   return &dump($namespace,$udomain,$uname,$regexp,$range);
+}
+
 # -------------------------------------------------------------- keys interface
 
 sub getkeys {
@@ -7250,6 +7257,27 @@
 
 =item *
 
+dumpstore($namespace,$udom,$uname,$regexp,$range) : 
+dumps the complete (or key matching regexp) namespace into a hash
+($udom, $uname, $regexp, $range are optional) for a namespace that is
+normally &store()ed into
+
+$range should be either an integer '100' (give me the first 100
+                                           matching records)
+              or be  two integers sperated by a - with no spaces
+                 '30-50' (give me the 30th through the 50th matching
+                          records)
+
+
+=item *
+
+putstore($namespace,$symb,$version,$storehash,$udomain,$uname) :
+replaces a &store() version of data with a replacement set of data
+for a particular resource in a namespace passed in the $storehash hash 
+reference
+
+=item *
+
 tmpstore($storehash,$symb,$namespace,$udom,$uname) : storage that
 works very similar to store/cstore, but all data is stored in a
 temporary location and can be reset using tmpreset, $storehash should
@@ -7303,13 +7331,6 @@
 
 =item *
 
-putstore($namespace,$symb,$version,$storehash,$udomain,$uname) :
-  replaces a &store() version of data with a replacement set of data
-  for a particular resource in a namespace passed in the $storehash hash 
-  reference
-
-=item *
-
 cput($namespace,$storehash,$udom,$uname) : critical put
 ($udom and $uname are optional)