[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Wed Dec 10 21:07:10 EST 2014
raeburn Thu Dec 11 02:07:10 2014 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Coding style: keys()
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1273 loncom/lonnet/perl/lonnet.pm:1.1274
--- loncom/lonnet/perl/lonnet.pm:1.1273 Sun Dec 7 19:45:30 2014
+++ loncom/lonnet/perl/lonnet.pm Thu Dec 11 02:07:09 2014
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1273 2014/12/07 19:45:30 raeburn Exp $
+# $Id: lonnet.pm,v 1.1274 2014/12/11 02:07:09 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5105,7 +5105,7 @@
my %rolesdump = &dump("roles", $domain, $username) or return 0;
my $now = time;
- for my $role (@rolesdump{grep { ! /^rolesdef_/ } keys %rolesdump}) {
+ for my $role (@rolesdump{grep { ! /^rolesdef_/ } keys(%rolesdump})) {
my ($trole, $tend, $tstart) = split(/_/, $role);
if (grep(/^\Q$trole\E$/,@{$roles})) {
return 1 unless ($tend && $tend < $now)
@@ -5194,7 +5194,7 @@
my %allroles=();
my %allgroups=();
- for my $area (grep { ! /^rolesdef_/ } keys %rolesdump) {
+ for my $area (grep { ! /^rolesdef_/ } keys(%rolesdump)) {
my $role = $rolesdump{$area};
$area =~ s/\_\w\w$//;
@@ -10697,7 +10697,7 @@
$metaentry{':keys'} = join(',',keys(%metathesekeys));
&metadata_generate_part0(\%metathesekeys,\%metaentry,$uri);
- $metaentry{':allpossiblekeys'}=join(',',keys %metathesekeys);
+ $metaentry{':allpossiblekeys'}=join(',',keys(%metathesekeys));
&do_cache_new('meta',$uri,\%metaentry,$cachetime);
# this is the end of "was not already recently cached
}
More information about the LON-CAPA-cvs
mailing list