Authen-Quiz
view release on metacpan or search on metacpan
AUTHEN_QUIZ_MEMCACHED_PORT = Port number that the Memcached uses.
2. Preparation for data file.
% cp -r ./eg/authen_quiz /path/to/myapp
## The quiz data is edited.
% vi /path/to/myapp/authen_quiz/authen_quiz.yaml
## The permission of the session data is set.
% chmod 666 /path/to/myapp/authen_quiz/authen_quiz_session.txt
OR
% chown web_owner /path/to/myapp/authen_quiz/authen_quiz_session.txt
AUTHOR
Masatoshi Mizuno E<lt>lusheE<64>cpan.orgE<gt>
COPYRIGHT AND LICENCE
inc/File/Temp.pm view on Meta::CPAN
} else {
my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ?
$OPENTEMPFLAGS :
$OPENFLAGS );
$flags |= $LOCKFLAG if (defined $LOCKFLAG && $options{use_exlock});
$open_success = sysopen($fh, $path, $flags, 0600);
}
if ( $open_success ) {
# in case of odd umask force rw
chmod(0600, $path);
# Opened successfully - return file handle and name
return ($fh, $path);
} else {
# Error opening file - abort with error
# if the reason was anything but EEXIST
unless ($!{EEXIST}) {
${$options{ErrStr}} = "Could not create temp file $path: $!";
inc/File/Temp.pm view on Meta::CPAN
}
# Loop round for another try
}
} elsif ($options{"mkdir"}) {
# Open the temp directory
if (mkdir( $path, 0700)) {
# in case of odd umask
chmod(0700, $path);
return undef, $path;
} else {
# Abort with error if the reason for failure was anything
# except EEXIST
unless ($!{EEXIST}) {
${$options{ErrStr}} = "Could not create directory $path: $!";
return ();
}
inc/File/Temp.pm view on Meta::CPAN
$path =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
}
return $path;
}
# Internal routine to force a temp file to be writable after
# it is created so that we can unlink it. Windows seems to occassionally
# force a file to be readonly when written to certain temp locations
sub _force_writable {
my $file = shift;
chmod 0600, $file;
}
# internal routine to check to see if the directory is safe
# First checks to see if the directory is not owned by the
# current user or root. Then checks to see if anyone else
# can write to the directory and if so, checks to see if
# it has the sticky bit set
# Will not work on systems that do not support sticky bit
( run in 0.314 second using v1.01-cache-2.11-cpan-496ff517765 )