[LON-CAPA-cvs] cvs: loncom / lonmap.pm

raeburn raeburn at source.lon-capa.org
Wed Dec 10 20:50:27 EST 2014


raeburn		Thu Dec 11 01:50:27 2014 EDT

  Modified files:              
    /loncom	lonmap.pm 
  Log:
  - Coding style: keys()
  
  
Index: loncom/lonmap.pm
diff -u loncom/lonmap.pm:1.14 loncom/lonmap.pm:1.15
--- loncom/lonmap.pm:1.14	Sat Jan 25 06:29:11 2014
+++ loncom/lonmap.pm	Thu Dec 11 01:50:27 2014
@@ -2,7 +2,7 @@
 #
 #  Read maps into a 'big hash'.
 #
-# $Id: lonmap.pm,v 1.14 2014/01/25 06:29:11 raeburn Exp $
+# $Id: lonmap.pm,v 1.15 2014/12/11 01:50:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -157,7 +157,7 @@
 	$key .= '.';		# If we are prefixing, prefix then .
     }
 
-    foreach my $childkey (keys (%$child)) {
+    foreach my $childkey (keys(%$child)) {
 	$parent->{$key . $childkey} = $child->{$childkey};
     }
 }
@@ -279,7 +279,7 @@
 					 $cenv->{'domain'},
 					 $cenv->{'num'});
 
-    foreach my $ver (keys (%versions)) {
+    foreach my $ver (keys(%versions)) {
 	if ($ver =~/^error\:/) { # lonc/lond transaction failed.
 	    throw Error::Simple('lonc/lond returned error: ' . $ver);
 	}
@@ -410,7 +410,7 @@
     my $courseid = $hash->{'context.courseid'};
 
     my $randomoutentry='';
-    foreach my $rid (keys %randompick) {
+    foreach my $rid (keys(%randompick)) {
         my $rndpick=$randompick{$rid};
         my $mpc=$hash->{'map_pc_'.$hash->{'src_'.$rid}};
 # ------------------------------------------- put existing resources into array
@@ -450,7 +450,7 @@
         }
     }
 # ------------------------------ take care of explicitly hidden urls or folders
-    foreach my $rid (keys %hiddenurl) {
+    foreach my $rid (keys(%hiddenurl)) {
 	$hash->{'randomout_'.$rid}='1';
 	my ($mapid,$resid)=split(/\./,$rid);
 	$randomoutentry.='&'.




More information about the LON-CAPA-cvs mailing list