File:
[LON-CAPA] /
loncom /
html /
adm /
help /
tex /
Guts_Coding_Guidelines.tex
Revision
1.1:
download - view:
text,
annotated -
select for diffs
Wed Aug 20 16:17:40 2003 UTC (21 years ago) by
bowersj2
Branches:
MAIN
CVS tags:
version_1_1_X,
version_1_1_3,
version_1_1_2,
version_1_1_1,
version_1_1_0,
version_1_0_99_3,
version_1_0_99_2,
version_1_0_99_1,
version_1_0_99,
HEAD
Adding some .tex files in. (LPML addition later; still some to go.)
Things to keep in mind while coding handlers for LON-CAPA:
\begin{enumerate}
\item \textbf{DON'T} write to Access machine disks with permanent data.
Use \texttt{Apache::lonnet::store/restore}.
\item \textbf{DO} \texttt{use strict;}
\item \textbf{DON'T} use \texttt{print()}. Use \texttt{\$request->print()}.
(Unfortunately, \texttt{print} sometimes seems to work while writing
the handler, but will it will fail unpredictably in real usage.)
\item \textbf{DON'T} launch children.
\item \textbf{DO} \texttt{use strict;}
\item \textbf{DO} use \texttt{\$Apache::lonnet::perlvar\{'lonDaemons'\}/tmp}
for temporary data.
\item \textbf{DO} query the return value of every file operation.
\item \textbf{DO} familiarize your self with the functions in lonnet.pm
and use them to communicate with other servers and when your handler
needs to ask questions.
\item \textbf{DON'T} use \texttt{\&Apache::lonnet::reply()}; use the proper
wrapper functions.
\item \textbf{DO} \texttt{use strict;}\end{enumerate}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>