--- loncom/lonnet/perl/lonnet.pm 2006/01/18 21:15:41 1.701 +++ loncom/lonnet/perl/lonnet.pm 2006/01/21 08:27:02 1.702 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.701 2006/01/18 21:15:41 albertel Exp $ +# $Id: lonnet.pm,v 1.702 2006/01/21 08:27:02 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2793,7 +2793,7 @@ sub del { # -------------------------------------------------------------- dump interface sub dump { - my ($namespace,$udomain,$uname,$regexp)=@_; + my ($namespace,$udomain,$uname,$regexp,$range)=@_; if (!$udomain) { $udomain=$env{'user.domain'}; } if (!$uname) { $uname=$env{'user.name'}; } my $uhome=&homeserver($uname,$udomain); @@ -2802,11 +2802,11 @@ sub dump { } else { $regexp='.'; } - my $rep=reply("dump:$udomain:$uname:$namespace:$regexp",$uhome); + my $rep=reply("dump:$udomain:$uname:$namespace:$regexp:$range",$uhome); my @pairs=split(/\&/,$rep); my %returnhash=(); foreach (@pairs) { - my ($key,$value)=split(/=/,$_); + my ($key,$value)=split(/=/,$_,2); $returnhash{unescape($key)}=&thaw_unescape($value); } return %returnhash; @@ -7048,10 +7048,15 @@ namesp ($udom and $uname are optional) =item * -dump($namespace,$udom,$uname,$regexp) : +dump($namespace,$udom,$uname,$regexp,$range) : dumps the complete (or key matching regexp) namespace into a hash -($udom, $uname and $regexp are optional) +($udom, $uname, $regexp, $range are optional) +$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 * inc($namespace,$store,$udom,$uname) : increments $store in $namespace.