Annotation of loncom/html/adm/help/tex/Guts_Coding_Guidelines.tex, revision 1.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>