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

bowersj2 lon-capa-cvs@mail.lon-capa.org
Thu, 14 Aug 2003 22:23:53 -0000


bowersj2		Thu Aug 14 18:23:53 2003 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Fix problem when metadata called itself recursively.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.400 loncom/lonnet/perl/lonnet.pm:1.401
--- loncom/lonnet/perl/lonnet.pm:1.400	Wed Aug 13 14:45:02 2003
+++ loncom/lonnet/perl/lonnet.pm	Thu Aug 14 18:23:53 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.400 2003/08/13 18:45:02 www Exp $
+# $Id: lonnet.pm,v 1.401 2003/08/14 22:23:53 bowersj2 Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3554,14 +3554,15 @@
         if ($liburi) {
 	    $liburi=&declutter($liburi);
             $filename=$liburi;
-        }
+        } else {
+	    delete($metacache{$uri.':packages'});
+	}
         my %metathesekeys=();
         unless ($filename=~/\.meta$/) { $filename.='.meta'; }
 	my $metastring=&getfile(&filelocation('',&clutter($filename)));
         my $parser=HTML::LCParser->new(\$metastring);
         my $token;
         undef %metathesekeys;
-	delete($metacache{$uri.':packages'});
         while ($token=$parser->get_token) {
 	    if ($token->[0] eq 'S') {
 		if (defined($token->[2]->{'package'})) {