[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonindexer.pm

www www at source.lon-capa.org
Tue Jul 10 11:46:42 EDT 2012


www		Tue Jul 10 15:46:42 2012 EDT

  Modified files:              
    /modules/gerd/harvesting	lonindexer.pm 
  Log:
  Correct file
  
  
Index: modules/gerd/harvesting/lonindexer.pm
diff -u modules/gerd/harvesting/lonindexer.pm:1.5 modules/gerd/harvesting/lonindexer.pm:1.6
--- modules/gerd/harvesting/lonindexer.pm:1.5	Mon Jul  9 18:04:50 2012
+++ modules/gerd/harvesting/lonindexer.pm	Tue Jul 10 15:46:42 2012
@@ -5,7 +5,7 @@
 #
 # MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
 #
-# $Id: lonindexer.pm,v 1.5 2012/07/09 18:04:50 www Exp $
+# $Id: lonindexer.pm,v 1.6 2012/07/10 15:46:42 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -117,7 +117,7 @@
 sub associated {
    my (@with)=@_;
    my %output=();
-   my %hash;
+   my %hash=();
 #
 # The associations database has entries: key -> other1:weight1,other2:weight2
 # to show which other resources have been used in the same context
@@ -269,7 +269,7 @@
    $skey=~s/\W+/\|/gs;
    $skey=lc($skey);
    my $pattern=qr/$skey/;
-   my %hash;
+   my %hash=();
    tie(%hash, 'GDBM_File', $datapath.'dbfiles/keywords.db',&GDBM_READER(),0640);
    foreach my $key (keys(%hash)) {
       if ($hash{$key}=~$pattern) {
@@ -287,7 +287,8 @@
 sub urlres {
    my @urls=@_;
    my %output=();
-   tie(%hash, 'GDBM_File', $datapath.'dbfiles/keywords.db',&GDBM_READER(),0640);
+   my $hash=();
+   tie(%hash, 'GDBM_File', $datapath.'dbfiles/url.db',&GDBM_READER(),0640);
    foreach my $url (@urls) {
       $output{$url}=$hash{$url}; 
    }




More information about the LON-CAPA-cvs mailing list