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 (20 years, 11 months 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.)
1: Things to keep in mind while coding handlers for LON-CAPA:
2:
3: \begin{enumerate}
4: \item \textbf{DON'T} write to Access machine disks with permanent data.
5: Use \texttt{Apache::lonnet::store/restore}.
6: \item \textbf{DO} \texttt{use strict;}
7: \item \textbf{DON'T} use \texttt{print()}. Use \texttt{\$request->print()}.
8: (Unfortunately, \texttt{print} sometimes seems to work while writing
9: the handler, but will it will fail unpredictably in real usage.)
10: \item \textbf{DON'T} launch children.
11: \item \textbf{DO} \texttt{use strict;}
12: \item \textbf{DO} use \texttt{\$Apache::lonnet::perlvar\{'lonDaemons'\}/tmp}
13: for temporary data.
14: \item \textbf{DO} query the return value of every file operation.
15: \item \textbf{DO} familiarize your self with the functions in lonnet.pm
16: and use them to communicate with other servers and when your handler
17: needs to ask questions.
18: \item \textbf{DON'T} use \texttt{\&Apache::lonnet::reply()}; use the proper
19: wrapper functions.
20: \item \textbf{DO} \texttt{use strict;}\end{enumerate}
21:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>