[LON-CAPA-cvs] cvs: rat / lonuserstate.pm
raeburn
raeburn at source.lon-capa.org
Thu Nov 16 07:44:48 EST 2017
raeburn Thu Nov 16 12:44:48 2017 EDT
Modified files:
/rat lonuserstate.pm
Log:
- Use three-argument open() to separate file mode from the filename.
Index: rat/lonuserstate.pm
diff -u rat/lonuserstate.pm:1.153 rat/lonuserstate.pm:1.154
--- rat/lonuserstate.pm:1.153 Sun Sep 3 18:52:23 2017
+++ rat/lonuserstate.pm Thu Nov 16 12:44:48 2017
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construct and maintain state and binary representation of course for user
#
-# $Id: lonuserstate.pm,v 1.153 2017/09/03 18:52:23 raeburn Exp $
+# $Id: lonuserstate.pm,v 1.154 2017/11/16 12:44:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1209,7 +1209,7 @@
}
@cond=('true:normal');
- unless (open(LOCKFILE,">$fn.db.lock")) {
+ unless (open(LOCKFILE,">","$fn.db.lock")) {
#
# Most likely a permissions problem on the lockfile or its directory.
#
@@ -1522,7 +1522,7 @@
# ---------------------------------------------------- Store away initial state
{
my $cfh;
- if (open($cfh,">$fn.state")) {
+ if (open($cfh,">","$fn.state")) {
print $cfh join("\n", at cond);
$gotstate = 1;
} else {
@@ -1559,7 +1559,7 @@
if (-e $fn) {
my @conditions=();
{
- open(my $fh,"<$fn");
+ open(my $fh,"<",$fn);
@conditions=<$fh>;
close($fh);
}
More information about the LON-CAPA-cvs
mailing list