Greg Slepak avatar Greg Slepak committed c8be3c6

moved dragonfly-newlisp/dragonfly-framework/docs into dragonfly-newlisp/api-docs

Comments (0)

Files changed (13)

api-docs/dragonfly.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>dragonfly.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>dragonfly.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2><p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
+<b>Version: </b>0.50<br/>
+<b>Author: </b>Team Dragonfly 2009<br/>
+<b>Location: </b><a href="http://code.google.com/p/dragonfly-newlisp/">http://code.google.com/p/dragonfly-newlisp/</a><br/>
+ <br>This file is the main entry-point of the Dragonfly framework and
+ contains several important functions, as well as the default route
+ definitions. The functions here are in the <tt>Dragonfly</tt> context (alias <tt>DF</tt>),
+ which is the context your static files will be evaluated in by default.
+ Therefore all of the functions here can be called in your templates without
+ needing to be context-qualified.
+ <br><br>Dragonfly's design is very simple, you can actually read through its
+ source in very little time to get a great understanding of exactly how
+ it works, and to get an idea of what sorts of tricks you can do to
+ customize it to your liking (remember, newLISP is <em>extremely</em> dynamic!).
+ <h3>The <tt>listener</tt> function</h3>
+ The <tt>listener</tt> function is called in <tt>index.cgi</tt>. It is the function that
+ kicks everything off by looping through the available routes, finding a
+ match, running it, sending the output to the browser, and then exiting.
+ <br><br>Before all of that, the very *first* thing it does is load the
+ plugins in the <tt>dragonfly-framework/plugins-active</tt> folder, giving them
+ an opportunity to do any special customization that they might require.
+ <h3>Environment Variables</h3>
+ At the very top of the <tt>config.lsp</tt> file there is the following line:
+ <pre> (dolist (x (env)) (constant (global (sym (upper-case (first x)))) (last x)))</pre>
+ This line simply loops through every environment variable and makes a
+ global symbol out of it. This makes it extremely simple to access environment
+ variables, simply type their name! If you prefer PHP-style, you can
+ access them through the <tt>$SERVER</tt> function (simply a synonym for <tt>env</tt>).
+ <br><br>To access any web parameters, files, and cookies use the functions <tt>$GET</tt>, <tt>$POST</tt>,
+ <tt>$FILES</tt>, and <tt>$COOKIES</tt>, respectively. See <tt>Request.lsp</tt> for more information.
+ <h3>Routes</h3>
+ <p>Routes are FOOP objects inheriting from the Route class. They should have the <tt>Route.</tt> prefix.
+ Currently they only need to support two functions: <tt>matches?</tt> and <tt>run</tt>.</p>
+ <p>The listener loops through the available routes and calls <tt>matches?</tt> on them
+ with no arguments. The route must decide, based on any data available to it,
+ whether or not it to return a non-nil value from <tt>matches?</tt>.</p>
+ Here, for example, is the <tt>matches?</tt> function for <tt>Route.Resource</tt>:
+ <pre> (define (matches?)
+     (when (regex {^([a-z]\w+)(/([a-z]\w+))?(/(\d+))?(\.([a-z]+))?} QUERY_STRING 1)
+         (set 'resource_name $1 'resource_action $3 'resource_id $5 'response_format $7)
+         (file? (set 'path (DF:resource-path resource_name)))
+     )
+ )
+ </pre>
+ There are two default routes: <tt>Route.Static</tt> and <tt>Route.Resource</tt>. See the
+ documentation on the example-site and in <tt>config.lsp</tt> for more information on
+ what they do.
+ <h3>Resources</h3>
+ <tt>Route.Resource</tt> handles URLs that refer to RESTful resources, represented as FOOP objects
+ deriving from the <tt>Resource</tt> class. The resources reside in the <tt>RESOURCES_PATH</tt> as .lsp files.
+ The URL scheme works in a similar manner to twitter's RESTful API:
+ <pre>http://mysite.com/<em>resource</em>[/<em>action</em>][/<em>id</em>][.<em>response_format</em>][?get paramters...]</pre>
+ <tt>resource</tt> maps to a context name in a special way. First <tt>Resource.</tt> is prepended
+ to the name, then the underscores are removed and the name is written in title case.
+ The <tt>resource</tt> may only have the letters A-Z (lowercase or uppercase), 0-9, the underscore,
+ and it must begin with a letter.
+ <br/><pre> my_resource => Resource.MyResource</pre>
+ The name also maps to a real file located in <tt>RESOURCES_PATH</tt> by appending ".lsp" to the name:
+ <br/><pre> my_resource => load file: RESOURCES_PATH/my_resource.lsp</pre>
+ If <tt>resource</tt> implements <tt>action</tt>, then that function is called.
+ Like <tt>resource</tt>, <tt>action</tt> may only contain letters, numbers, and the underscore.
+ If no <tt>action</tt> is specified, then the resource's default function is called instead.
+ <p>The optional paramters <tt>id</tt> and <tt>response_format</tt> are passed in to the function
+ as parameters (in that order).</p>
+ <p><tt>id</tt> may only contain numbers, and <tt>response_format</tt> may only contain letters.</p>
+ <h3>Plugins</h3>
+ There are two types of plugins, those in the <tt>plugins-active</tt> folder, and those
+ in the <tt>plugins-inactive</tt> folder. The ones in the former are loaded when <tt>listener</tt>
+ is called, prior to running the routes. Every .lsp file in the <tt>plugins-active</tt> folder
+ is loaded at that point, so you'll only want your most frequently used files in there.
+ <p>A good example of an active plugin is a custom route. Defining a custom route consists
+ of two basic steps: creating your <tt>Route</tt> "subclass", and adding an instance of
+ it to <tt>Dragonfly:dragonfly-routes</tt>. Take a look at how it's done in the source of
+ <tt>dragonfly.lsp</tt> for more info.</p>
+ <p>Inactive plugins are simply those that should be loaded on a "need to use" basis.
+ Most plugins will probably fall into this category. Use <tt>Dragonfly:activate-plugin</tt>
+ to load them. All plugins are loaded exactly once, no matter how many times
+ <tt>activate-plugin</tt> is called on them.</p>
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_STDOUT"></a><h3><font color=#CC0000>STDOUT</font></h3>
+<b>syntax: STDOUT</b><br/>
+ This is the buffer that contains the content that will get written
+ to STDOUT if no errors are thrown. <tt>MAIN:print</tt> and <tt>MAIN:println</tt>
+ are globally overridden to write to this buffer.
+ Normally you should never need to modify this variable, however it is
+ documented for reference's sake.
+
+
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_activate-plugin"></a><h3><font color=#CC0000>Dragonfly:activate-plugin</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:activate-plugin</font> <em>str-plugin-name</em> [<em>str-plugin-name-2</em> ...])</b><br/>
+<b>parameter: </b><em>str-plugin-name</em> - The name of the plugin to load, without the ".lsp" extension.<br/>
+ <br>Loads (once only) a the named plugin from the <tt>plugins-inactive</tt> folder.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_web-root"></a><h3><font color=#CC0000>Dragonfly:web-root</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:web-root</font> <em>str-path</em>)</b><br/>
+<b>parameter: </b><em>str-path</em> - Path relative to the folder containing <tt>index.cgi</tt>.<br/>
+ <p>This function is quite handy for making working links when your <tt>index.cgi</tt> file
+ is not in <tt>DOCUMENT_ROOT</tt> but a subfolder of it.</p>
+<b>example:</b><blockquote><pre> ; index.cgi is located in /home/user/site.com/examples-site
+ ; Users visit http://www.site.com/example-site
+ (web-root "about") =&gt; "/example-site/about"
+ (web-root "/foo") =&gt; "/example-site/foo"</pre></blockquote>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_view-path"></a><h3><font color=#CC0000>Dragonfly:view-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:view-path</font> <em>str-view-name</em>)</b><br/>
+<b>parameter: </b><em>str-view-name</em> - Name of view in <tt>VIEWS_PATH</tt>, without any extension.<br/>
+ <br>Returns the absolute path to the view as a string, appending <tt>VIEW_EXTENSION</tt> if necessary.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_partial-path"></a><h3><font color=#CC0000>Dragonfly:partial-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:partial-path</font> <em>str-partial-name</em>)</b><br/>
+ <br>Just like <tt>view-path</tt>, except for partials in <tt>PARTIALS_PATH</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_resource-path"></a><h3><font color=#CC0000>Dragonfly:resource-path</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:resource-path</font> <em>str-resource-name</em>)</b><br/>
+ <br>Similar to <tt>view-path</tt>, except for resources in <tt>RESOURCES_PATH</tt>.
+ Don't include the .lsp extension.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_include"></a><h3><font color=#CC0000>Dragonfly:include</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:include</font>)</b><br/>
+ <br>Like <tt>display-file</tt> but does not pass the file through <tt>eval-template</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-file"></a><h3><font color=#CC0000>Dragonfly:display-file</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-file</font>)</b><br/>
+ <br>String-concats its arguments and displays the file
+ at that path after passing it through <tt>eval-template</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-partial"></a><h3><font color=#CC0000>Dragonfly:display-partial</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-partial</font> <em>str-partial-name</em>)</b><br/>
+ Displays the partial named <em>str-partial-name</em> using <tt>display-file</tt> and <tt>partial-path</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-view"></a><h3><font color=#CC0000>Dragonfly:display-view</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-view</font> <em>str-view-name</em>)</b><br/>
+ Displays the view named <em>str-view-name</em> using <tt>display-file</tt> and <tt>view-path</tt>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_display-error"></a><h3><font color=#CC0000>Dragonfly:display-error</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:display-error</font> <em>int-error-code</em>)</b><br/>
+ <br>Sends the <em>int-error-code</em> and, if it exists, displays the view named
+ <em>int-error-code</em> using <tt>display-view</tt>. Otherwise, displays the built-in error
+ template <tt>Dragonfly:ERROR_TEMPLATE</tt>.
+<br/><br/>
+ If an error is thrown with <tt>throw-error</tt>, this is automatically called
+ with an <em>int-error-code</em> of 500 (Internal Server Error).
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_eval-template"></a><h3><font color=#CC0000>Dragonfly:eval-template</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:eval-template</font> <em>str</em> [<em>ctx</em>])</b><br/>
+<b>parameter: </b><em>str</em> - A string containing the template.<br/>
+<b>parameter: </b><em>ctx</em> - Optional. Represents the context the template is evaluted in. Defaults to Dragonfly.<br/>
+ <br>newLISP code in the template between the <tt>OPEN_TAG</tt> and <tt>CLOSE_TAG</tt> (see <tt>config.lsp</tt>) is
+ evaluated, and the result, along with the text outside of the "code islands" will be sent if no errors occur.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_die"></a><h3><font color=#CC0000>Dragonfly:die</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:die</font>)</b><br/>
+ <br>String-concats its arguments, logs them as an error via <tt>log-err</tt>, and calls
+ <tt>throw-error</tt> with the same string.
+<br/><br/>
+<b>see: </b>Dragonfly:display-error<br/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

api-docs/index.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Index</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>Index</h1></center>
+<a href="dragonfly.lsp.html"><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2></a>
+<p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
+<a href="dragonfly.lsp.html#_STDOUT">STDOUT</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_activate-plugin">activate-plugin</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_web-root">web-root</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_view-path">view-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_partial-path">partial-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_resource-path">resource-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_include">include</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-file">display-file</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-partial">display-partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-view">display-view</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-error">display-error</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_eval-template">eval-template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_die">die</a>&nbsp; &nbsp; <a href="log.lsp.html"><br/><br/><h2>Module:&nbsp;log.lsp</h2></a>
+<p>Provides convenient logging facility for all of Dragonfly.</p>
+<a href="log.lsp.html#Dragonfly_log-func">log-func</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-debug">log-debug</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-info">log-info</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-warn">log-warn</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-err">log-err</a>&nbsp; &nbsp; <a href="request.lsp.html"><br/><br/><h2>Module:&nbsp;request.lsp</h2></a>
+<p></p>
+<a href="request.lsp.html#_$GET">$GET</a>&nbsp; &nbsp; <a href="request.lsp.html#_$POST">$POST</a>&nbsp; &nbsp; <a href="request.lsp.html#_$FILES">$FILES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$COOKIES">$COOKIES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$BINARY">$BINARY</a>&nbsp; &nbsp; <a href="response.lsp.html"><br/><br/><h2>Module:&nbsp;response.lsp</h2></a>
+<p></p>
+<a href="response.lsp.html#Response_status">status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_header">header</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_cookie">cookie</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers">send-headers</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_redirect">redirect</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers-with-status">send-headers-with-status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_content-type">content-type</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_extension->type">extension->type</a>&nbsp; &nbsp; <a href="utils.lsp.html"><br/><br/><h2>Module:&nbsp;utils.lsp</h2></a>
+<p></p>
+<a href="utils.lsp.html#_regex-captcha">regex-captcha</a>&nbsp; &nbsp; <a href="utils.lsp.html#_load-files-in-dir">load-files-in-dir</a>&nbsp; &nbsp; <a href="utils.lsp.html#_into-ctx-assoc">into-ctx-assoc</a>&nbsp; &nbsp; 
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

api-docs/log.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>log.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>log.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;log.lsp</h2><p>Provides convenient logging facility for all of Dragonfly.</p>
+<b>Author: </b>Greg Slepak<br/>
+ <p>To avoid checking the value of <tt>Dragonfly:LOG_LEVEL</tt> each time something is logged
+ the logging functions that correspond to a lower logging level are disabled
+ when this file is loaded.</p>
+ <p>It is possible to change the <tt>LOG_LEVEL</tt> at runtime, but the way it is done
+ is slightly tricky because <tt>MAIN:load</tt> is overwritten by Dragonfly
+ to provide once-only loading. If you want to dynamically change the
+ log-level (say in a plugin), then you will need to use the remapped <tt>sys-load</tt>
+ function to force a reload of this file:</p>
+ <pre> (context 'DF)
+ (constant 'LOG_LEVEL 'LOG_DEBUG) ; enable debug logging at runtime
+ (sys-load (string DRAGONFLY_ROOT "/lib/log.lsp"))
+ (context MAIN)</pre>
+ There are four log levels defined:
+ <pre> (map set '(LOG_DEBUG LOG_INFO LOG_WARN LOG_ERROR)
+          '(        0        1        2         3))</pre>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-func"></a><h3><font color=#CC0000>Dragonfly:log-func</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-func</font> <em>str-level</em> <em>str-msg</em>)</b><br/>
+<b>parameter: </b><em>str-level</em> - a string representing the log level (ex: "[DEBUG]: ")<br/>
+<b>parameter: </b><em>str-msg</em> - a string containing the message<br/>
+ <br/>This function appends to the file specified by <tt>Dragonfly:LOG_FILE_PATH</tt>
+ and prepends date information to the log.
+ <pre> (log-func "[CRAZY!]: " (string user " just did something crazy!"))
+ => Oct 26 01:44:24 [CRAZY!]: johnny-b just did something crazy!</pre>
+ All other log functions call this one. You can override this function
+ at runtime to provide your own logging behavior.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-debug"></a><h3><font color=#CC0000>Dragonfly:log-debug</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-debug</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[DEBUG]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-info"></a><h3><font color=#CC0000>Dragonfly:log-info</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-info</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[INFO]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-warn"></a><h3><font color=#CC0000>Dragonfly:log-warn</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-warn</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[WARNING]: "
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Dragonfly_log-err"></a><h3><font color=#CC0000>Dragonfly:log-err</font></h3>
+<b>syntax: (<font color=#CC0000>Dragonfly:log-err</font>)</b><br/>
+ <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[ERROR]: "
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

api-docs/request.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>request.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>request.lsp</h1></center>
+<p><a href="index.html">Module index</a></p>
+<br/><br/><br/><h2>Module:&nbsp;request.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+ <h3>$GET/$POST</h3>
+ These are very similar to the PHP $_GET and $_POST associative arrays.
+ Use them to retrieve the GET/POST values.
+ If a variable was specified, but no value assigned (i.e. <tt>/?foo</tt>), then
+ the value will be an empty string (you can use <tt>empty?</tt> to check for this).
+ If the variable does not exist, <tt>nil</tt> will be returned.
+ <br><br>The values are url decoded:
+ <pre> "What+time+is+it%3f"  => "What time is it?"</pre>
+ <h3>$FILES</h3>
+ If a <tt>multipart/form-data</tt> content type was submitted, then
+ STDIN is read for the values. Any files are placed in <tt>$FILES</tt>, while
+ other key/value pairs are placed in <tt>$POST</tt>.
+ <br><br>The values in <tt>$FILES</tt> contain an associative array with more information
+ about the files.
+ <h3>$BINARY</h3>
+ If the environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to
+ "binary" then STDIN is read (up to <tt>MAX_POST_LENGTH</tt>) and the data is
+ stored in <tt>$BINARY</tt>. Note that unlike the other symbols in this file,
+ <tt>$BINARY</tt> is a string, not a function.
+ <h3>$COOKIES</h3>
+ The environment variable <tt>HTTP_COOKIE</tt> is parsed and the cookies are placed in
+ in <tt>$COOKIES</tt> as key/value pairs just like <tt>$GET</tt> and <tt>$POST</tt>.
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$GET"></a><h3><font color=#CC0000>$GET</font></h3>
+<b>syntax: (<font color=#CC0000>$GET</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the GET parameter for <em>str-key</em>, nil if no such GET variable was passed in.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$POST"></a><h3><font color=#CC0000>$POST</font></h3>
+<b>syntax: (<font color=#CC0000>$POST</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the POST parameter for <em>str-key</em>, nil if no such POST variable was passed in.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$FILES"></a><h3><font color=#CC0000>$FILES</font></h3>
+<b>syntax: (<font color=#CC0000>$FILES</font> <em>str-key</em>)</b><br/>
+ <p>Returns an association list with keys <tt>'name</tt>, <tt>'data</tt>, and <tt>'length</tt> for the result
+ of a <tt>multipart/form-data</tt> posted form.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$COOKIES"></a><h3><font color=#CC0000>$COOKIES</font></h3>
+<b>syntax: (<font color=#CC0000>$COOKIES</font> <em>str-key</em>)</b><br/>
+<p><b>return: </b>the value of the cookie with the key <em>str-key</em>, or nil if no such cookie exists.</p>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_$BINARY"></a><h3><font color=#CC0000>$BINARY</font></h3>
+<b>syntax: $BINARY</b><br/>
+ <p>This is a global buffer that contains what was sent to STDIN (up to <tt>MAX_POST_LENGTH</tt>)
+ when the value of environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to "binary".</p>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

api-docs/response.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>response.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>response.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;response.lsp</h2><b>Author: </b>Greg Slepak<br/>
+
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_status"></a><h3><font color=#CC0000>Response:status</font></h3>
+<b>syntax: (<font color=#CC0000>Response:status</font>)</b><br/>
+<b>syntax: (<font color=#CC0000>Response:status</font> <em>int-code</em> [<em>str-description</em>])</b><br/>
+ <p>In the first syntax, returns a list containing the current status code and corresponding description.</p>
+ <p>In the second syntax, sets the response status to <em>int-code</em>, using the description from
+ a built-in list. If the description for <em>int-code</em> is not found in the built-in
+ list then an error will be thrown if <em>str-description</em> is not provided.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_header"></a><h3><font color=#CC0000>Response:header</font></h3>
+<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the header's name<br><br/>
+<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em> <em>str-value</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the header's name<br/>
+<b>parameter: </b><em>str-value</em> - the header's value<br/>
+ <br>In the first syntax, returns the header matching <em>str-key</em> or,
+ if <em>str-key</em> is nil, all of the headers in an association list.
+ <br>In the second syntax, sets or updates the header matching <em>str-key</em> or,
+ if <em>str-value</em> is nil, deletes the header for <em>str-key</em>.
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_cookie"></a><h3><font color=#CC0000>Response:cookie</font></h3>
+<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em>)</b><br/>
+<b>parameter: </b><em>str-key</em> - the cookie's name<br><br/>
+<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em> <em>str-value</em> [<em>int-expires</em> [<em>str-path</em> [<em>str-domain</em> [<em>bool-http-only</em>]]]])</b><br/>
+<b>parameter: </b><em>str-key</em> - the cookie's name<br/>
+<b>parameter: </b><em>str-value</em> - the cookie's value<br/>
+<b>parameter: </b><em>int-expires</em> - (optional) the expiration date of the cookie as a unix timestamp; default is a session cookie<br/>
+<b>parameter: </b><em>str-path</em> - (optional) the cookie's path; default is the current path<br/>
+<b>parameter: </b><em>str-domain</em> - (optional) the cookie's domain; default is the current host<br/>
+<b>parameter: </b><em>bool-http-only</em> - (optional) whether the cookie may be read by client-side scripts<br/>
+ <p>In the first syntax, <tt>cookie</tt> returns the value of the cookie named <em>str-key</em> or <tt>nil</tt>. If
+ <em>str-key</em> is not provided, an association list of all cookie key/value pairs is returned.</p>
+ <p>In the second syntax, <tt>cookie</tt> sets a new cookie. If <em>str-value</em> is nil then any existing
+ cookie is deleted, otherwise it is updated with the value and the rest of the parameters.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_send-headers"></a><h3><font color=#CC0000>Response:send-headers</font></h3>
+<b>syntax: (<font color=#CC0000>Response:send-headers</font>)</b><br/>
+ <p>Actually sends the headers (without buffering them to <tt>Dragonfly:STDOUT</tt>).
+ Normally you should never call this yourself!</p>
+
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_redirect"></a><h3><font color=#CC0000>Response:redirect</font></h3>
+<b>syntax: (<font color=#CC0000>Response:redirect</font> <em>str-url</em>)</b><br/>
+<b>parameter: </b><em>str-url</em> - The URL you'd like to send them to<br/>
+ <p>Does an immediate 302 Found redirect and calls <tt>exit</tt>.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_send-headers-with-status"></a><h3><font color=#CC0000>Response:send-headers-with-status</font></h3>
+<b>syntax: (<font color=#CC0000>Response:send-headers-with-status</font> <em>int-code</em> <em>str-description</em>)</b><br/>
+ <p>Convenience. Combines a call to <tt>Response:status</tt> and <tt>Response:send-headers</tt>.
+ As this calls <tt>send-headers</tt>, you typically do not want to call this yourself!</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_content-type"></a><h3><font color=#CC0000>Response:content-type</font></h3>
+<b>syntax: (<font color=#CC0000>Response:content-type</font> <em>str-value</em>)</b><br/>
+ <p>Convenience for calling <tt>(Response:header "Content-Type" str-value)</tt>.</p>
+ <p>If <em>str-value</em> is nil, returns the current content-type value</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="Response_extension->type"></a><h3><font color=#CC0000>Response:extension->type</font></h3>
+<b>syntax: (<font color=#CC0000>Response:extension->type</font> <em>str-file-extension</em>)</b><br/>
+ <p>Given a file extension (with or without a preceding dot), returns the
+ MIME-type for that extension. Currently only a small number of file extensions
+ are supported by default, see the source in lib/response.lsp for a complete list.</p>
+
+
+
+
+
+
+
+
+
+
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

api-docs/utils.lsp.html

+<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>utils.lsp</title>
+
+<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
+</head>
+
+<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
+			link="#376590" vlink="#551A8B" alink="#ffAA28">
+<blockquote>
+<center><h1>utils.lsp</h1></center>
+<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;utils.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
+ <p>This file not only provides the functions documented below, but
+ it also plays a role in globally overriding certain functions in the MAIN context.</p>
+ <p>The overridden functions include: <tt>load</tt>, <tt>print</tt>, and <tt>println</tt>.</p>
+ <p><tt>load</tt> is overwritten to load a file only once, while <tt>print</tt> and <tt>println</tt>
+ are overwritten to send their output the the <tt>Dragonfly:STDOUT</tt> buffer, allowing
+ Dragonfly to ensure pages are displayed properly.</p>
+
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_regex-captcha"></a><h3><font color=#CC0000>regex-captcha</font></h3>
+<b>syntax: (<font color=#CC0000>regex-captcha</font> <em>str-regex</em> <em>str</em> [<em>int-options</em>] [<em>int-captcha</em>])</b><br/>
+<b>parameter: </b><em>int-options</em> - options to regex, defaults to 0.<br/>
+<b>parameter: </b><em>int-captch</em> - which of the regex group captures to return, defaults to 1.<br/>
+ <p>Returns the captured text, or nil if it couldn't be captured.<br/>This is a global function.</p>
+ <b>example:</b>
+ <pre> (regex-captcha {^(foo|bar).*} "foobaz") => "foo"
+ (regex-captcha {^(foo|bar).*} "bazfoo") => nil</pre>
+<br/><br/>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_load-files-in-dir"></a><h3><font color=#CC0000>load-files-in-dir</font></h3>
+<b>syntax: (<font color=#CC0000>load-files-in-dir</font> <em>str-dir</em> <em>regex-match</em>)</b><br/>
+ <p>Loads all the files in <em>str-dir</em> matching <em>regex-match</em>. Does not
+ traverse subdirectories.<br/>This is a global function.</p>
+<br/><br/>
+<br/><br/><center>- &sect; -</center><br/>
+<a name="_into-ctx-assoc"></a><h3><font color=#CC0000>into-ctx-assoc</font></h3>
+<b>syntax: (<font color=#CC0000>into-ctx-assoc</font> <em>ctx</em> <em>list-assoc</em>)</b><br/>
+ <p>Places the key/value pairs in <em>list-assoc</em> into the context <em>ctx</em>
+ to be used as a lookup table.<br/>This is a global function.</p>
+ <b>example:</b>
+ <pre> (new Tree 'MyCtx)
+ (into-ctx-assoc MyCtx '(
+     ("key" "value")
+     ("apple" "mmmm... good")
+     ("organic?" true)
+ ))</pre>
+<br/><br/>
+
+<br/><br/><center>- &part; -</center><br/>
+<center><font face='Arial' size='-2' color='#444444'>
+generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
+and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
+</font></center>
+</blockquote>
+</body>
+</html>

example-site/dragonfly-framework/docs/dragonfly.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>dragonfly.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>dragonfly.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2><p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
-<b>Version: </b>0.50<br/>
-<b>Author: </b>Greg Slepak, Marc Hildmann (Team Dragonfly 2009)<br/>
-<b>Location: </b><a href="http://code.google.com/p/dragonfly-newlisp/">http://code.google.com/p/dragonfly-newlisp/</a><br/>
- <br>This file is the main entry-point of the Dragonfly framework and
- contains several important functions, as well as the default route
- definitions. The functions here are in the <tt>Dragonfly</tt> context (alias <tt>DF</tt>),
- which is the context your static files will be evaluated in by default.
- Therefore all of the functions here can be called in your templates without
- needing to be context-qualified.
- <br><br>Dragonfly's design is very simple, you can actually read through its
- source in very little time to get a great understanding of exactly how
- it works, and to get an idea of what sorts of tricks you can do to
- customize it to your liking (remember, newLISP is <em>extremely</em> dynamic!).
- <h3>The <tt>listener</tt> function</h3>
- The <tt>listener</tt> function is called in <tt>index.cgi</tt>. It is the function that
- kicks everything off by looping through the available routes, finding a
- match, running it, sending the output to the browser, and then exiting.
- <br><br>Before all of that, the very *first* thing it does is load the
- plugins in the <tt>dragonfly-framework/plugins-active</tt> folder, giving them
- an opportunity to do any special customization that they might require.
- <h3>Environment Variables</h3>
- At the very top of the <tt>config.lsp</tt> file there is the following line:
- <pre> (dolist (x (env)) (constant (global (sym (upper-case (first x)))) (last x)))</pre>
- This line simply loops through every environment variable and makes a
- global symbol out of it. This makes it extremely simple to access environment
- variables, simply type their name! If you prefer PHP-style, you can
- access them through the <tt>$SERVER</tt> function (simply a synonym for <tt>env</tt>).
- <br><br>To access any web parameters, files, and cookies use the functions <tt>$GET</tt>, <tt>$POST</tt>,
- <tt>$FILES</tt>, and <tt>$COOKIES</tt>, respectively. See <tt>Request.lsp</tt> for more information.
- <h3>Routes</h3>
- <p>Routes are FOOP objects inheriting from the Route class. They should have the <tt>Route.</tt> prefix.
- Currently they only need to support two functions: <tt>matches?</tt> and <tt>run</tt>.</p>
- <p>The listener loops through the available routes and calls <tt>matches?</tt> on them
- with no arguments. The route must decide, based on any data available to it,
- whether or not it to return a non-nil value from <tt>matches?</tt>.</p>
- Here, for example, is the <tt>matches?</tt> function for <tt>Route.Resource</tt>:
- <pre> (define (matches?)
-     (when (regex {^([a-z]\w+)(/([a-z]\w+))?(/(\d+))?(\.([a-z]+))?} QUERY_STRING 1)
-         (set 'resource_name $1 'resource_action $3 'resource_id $5 'response_format $7)
-         (file? (set 'path (DF:resource-path resource_name)))
-     )
- )
- </pre>
- There are two default routes: <tt>Route.Static</tt> and <tt>Route.Resource</tt>. See the
- documentation on the example-site and in <tt>config.lsp</tt> for more information on
- what they do.
- <h3>Resources</h3>
- <tt>Route.Resource</tt> handles URLs that refer to RESTful resources, represented as FOOP objects
- deriving from the <tt>Resource</tt> class. The resources reside in the <tt>RESOURCES_PATH</tt> as .lsp files.
- The URL scheme works in a similar manner to twitter's RESTful API:
- <pre>http://mysite.com/<em>resource</em>[/<em>action</em>][/<em>id</em>][.<em>response_format</em>][?get paramters...]</pre>
- <tt>resource</tt> maps to a context name in a special way. First <tt>Resource.</tt> is prepended
- to the name, then the underscores are removed and the name is written in title case.
- The <tt>resource</tt> may only have the letters A-Z (lowercase or uppercase), 0-9, the underscore,
- and it must begin with a letter.
- <br/><pre> my_resource => Resource.MyResource</pre>
- The name also maps to a real file located in <tt>RESOURCES_PATH</tt> by appending ".lsp" to the name:
- <br/><pre> my_resource => load file: RESOURCES_PATH/my_resource.lsp</pre>
- If <tt>resource</tt> implements <tt>action</tt>, then that function is called.
- Like <tt>resource</tt>, <tt>action</tt> may only contain letters, numbers, and the underscore.
- If no <tt>action</tt> is specified, then the resource's default function is called instead.
- <p>The optional paramters <tt>id</tt> and <tt>response_format</tt> are passed in to the function
- as parameters (in that order).</p>
- <p><tt>id</tt> may only contain numbers, and <tt>response_format</tt> may only contain letters.</p>
- <h3>Plugins</h3>
- There are two types of plugins, those in the <tt>plugins-active</tt> folder, and those
- in the <tt>plugins-inactive</tt> folder. The ones in the former are loaded when <tt>listener</tt>
- is called, prior to running the routes. Every .lsp file in the <tt>plugins-active</tt> folder
- is loaded at that point, so you'll only want your most frequently used files in there.
- <p>A good example of an active plugin is a custom route. Defining a custom route consists
- of two basic steps: creating your <tt>Route</tt> "subclass", and adding an instance of
- it to <tt>Dragonfly:dragonfly-routes</tt>. Take a look at how it's done in the source of
- <tt>dragonfly.lsp</tt> for more info.</p>
- <p>Inactive plugins are simply those that should be loaded on a "need to use" basis.
- Most plugins will probably fall into this category. Use <tt>Dragonfly:activate-plugin</tt>
- to load them. All plugins are loaded exactly once, no matter how many times
- <tt>activate-plugin</tt> is called on them.</p>
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_STDOUT"></a><h3><font color=#CC0000>STDOUT</font></h3>
-<b>syntax: STDOUT</b><br/>
- This is the buffer that contains the content that will get written
- to STDOUT if no errors are thrown. <tt>MAIN:print</tt> and <tt>MAIN:println</tt>
- are globally overridden to write to this buffer.
- Normally you should never need to modify this variable, however it is
- documented for reference's sake.
-
-
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_activate-plugin"></a><h3><font color=#CC0000>Dragonfly:activate-plugin</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:activate-plugin</font> <em>str-plugin-name</em> [<em>str-plugin-name-2</em> ...])</b><br/>
-<b>parameter: </b><em>str-plugin-name</em> - The name of the plugin to load, without the ".lsp" extension.<br/>
- <br>Loads (once only) a the named plugin from the <tt>plugins-inactive</tt> folder.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_web-root"></a><h3><font color=#CC0000>Dragonfly:web-root</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:web-root</font> <em>str-path</em>)</b><br/>
-<b>parameter: </b><em>str-path</em> - Path relative to the folder containing <tt>index.cgi</tt>.<br/>
- <p>This function is quite handy for making working links when your <tt>index.cgi</tt> file
- is not in <tt>DOCUMENT_ROOT</tt> but a subfolder of it.</p>
-<b>example:</b><blockquote><pre> ; index.cgi is located in /home/user/site.com/examples-site
- ; Users visit http://www.site.com/example-site
- (web-root "about") =&gt; "/example-site/about"
- (web-root "/foo") =&gt; "/example-site/foo"</pre></blockquote>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_view-path"></a><h3><font color=#CC0000>Dragonfly:view-path</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:view-path</font> <em>str-view-name</em>)</b><br/>
-<b>parameter: </b><em>str-view-name</em> - Name of view in <tt>VIEWS_PATH</tt>, without any extension.<br/>
- <br>Returns the absolute path to the view as a string, appending <tt>VIEW_EXTENSION</tt> if necessary.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_partial-path"></a><h3><font color=#CC0000>Dragonfly:partial-path</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:partial-path</font> <em>str-partial-name</em>)</b><br/>
- <br>Just like <tt>view-path</tt>, except for partials in <tt>PARTIALS_PATH</tt>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_resource-path"></a><h3><font color=#CC0000>Dragonfly:resource-path</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:resource-path</font> <em>str-resource-name</em>)</b><br/>
- <br>Similar to <tt>view-path</tt>, except for resources in <tt>RESOURCES_PATH</tt>.
- Don't include the .lsp extension.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_include"></a><h3><font color=#CC0000>Dragonfly:include</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:include</font>)</b><br/>
- <br>Like <tt>display-file</tt> but does not pass the file through <tt>eval-template</tt>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_display-file"></a><h3><font color=#CC0000>Dragonfly:display-file</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:display-file</font>)</b><br/>
- <br>String-concats its arguments and displays the file
- at that path after passing it through <tt>eval-template</tt>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_display-partial"></a><h3><font color=#CC0000>Dragonfly:display-partial</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:display-partial</font> <em>str-partial-name</em>)</b><br/>
- Displays the partial named <em>str-partial-name</em> using <tt>display-file</tt> and <tt>partial-path</tt>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_display-view"></a><h3><font color=#CC0000>Dragonfly:display-view</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:display-view</font> <em>str-view-name</em>)</b><br/>
- Displays the view named <em>str-view-name</em> using <tt>display-file</tt> and <tt>view-path</tt>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_display-error"></a><h3><font color=#CC0000>Dragonfly:display-error</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:display-error</font> <em>int-error-code</em>)</b><br/>
- <br>Sends the <em>int-error-code</em> and, if it exists, displays the view named
- <em>int-error-code</em> using <tt>display-view</tt>. Otherwise, displays the built-in error
- template <tt>Dragonfly:ERROR_TEMPLATE</tt>.
-<br/><br/>
- If an error is thrown with <tt>throw-error</tt>, this is automatically called
- with an <em>int-error-code</em> of 500 (Internal Server Error).
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_eval-template"></a><h3><font color=#CC0000>Dragonfly:eval-template</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:eval-template</font> <em>str</em> [<em>ctx</em>])</b><br/>
-<b>parameter: </b><em>str</em> - A string containing the template.<br/>
-<b>parameter: </b><em>ctx</em> - Optional. Represents the context the template is evaluted in. Defaults to Dragonfly.<br/>
- <br>newLISP code in the template between the <tt>OPEN_TAG</tt> and <tt>CLOSE_TAG</tt> (see <tt>config.lsp</tt>) is
- evaluated, and the result, along with the text outside of the "code islands" will be sent if no errors occur.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_die"></a><h3><font color=#CC0000>Dragonfly:die</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:die</font>)</b><br/>
- <br>String-concats its arguments, logs them as an error via <tt>log-err</tt>, and calls
- <tt>throw-error</tt> with the same string.
-<br/><br/>
-<b>see: </b>Dragonfly:display-error<br/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/docs/index.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>Index</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>Index</h1></center>
-<a href="dragonfly.lsp.html"><br/><br/><h2>Module:&nbsp;dragonfly.lsp</h2></a>
-<p>The heart of Dragonfly - A newLISP web framework for rapid web development.</p>
-<a href="dragonfly.lsp.html#_STDOUT">STDOUT</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_activate-plugin">activate-plugin</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_web-root">web-root</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_view-path">view-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_partial-path">partial-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_resource-path">resource-path</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_include">include</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-file">display-file</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-partial">display-partial</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-view">display-view</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_display-error">display-error</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_eval-template">eval-template</a>&nbsp; &nbsp; <a href="dragonfly.lsp.html#Dragonfly_die">die</a>&nbsp; &nbsp; <a href="log.lsp.html"><br/><br/><h2>Module:&nbsp;log.lsp</h2></a>
-<p>Provides convenient logging facility for all of Dragonfly.</p>
-<a href="log.lsp.html#Dragonfly_log-func">log-func</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-debug">log-debug</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-info">log-info</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-warn">log-warn</a>&nbsp; &nbsp; <a href="log.lsp.html#Dragonfly_log-err">log-err</a>&nbsp; &nbsp; <a href="request.lsp.html"><br/><br/><h2>Module:&nbsp;request.lsp</h2></a>
-<p></p>
-<a href="request.lsp.html#_$GET">$GET</a>&nbsp; &nbsp; <a href="request.lsp.html#_$POST">$POST</a>&nbsp; &nbsp; <a href="request.lsp.html#_$FILES">$FILES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$COOKIES">$COOKIES</a>&nbsp; &nbsp; <a href="request.lsp.html#_$BINARY">$BINARY</a>&nbsp; &nbsp; <a href="response.lsp.html"><br/><br/><h2>Module:&nbsp;response.lsp</h2></a>
-<p></p>
-<a href="response.lsp.html#Response_status">status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_header">header</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_cookie">cookie</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers">send-headers</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_redirect">redirect</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_send-headers-with-status">send-headers-with-status</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_content-type">content-type</a>&nbsp; &nbsp; <a href="response.lsp.html#Response_extension->type">extension->type</a>&nbsp; &nbsp; <a href="utils.lsp.html"><br/><br/><h2>Module:&nbsp;utils.lsp</h2></a>
-<p></p>
-<a href="utils.lsp.html#_regex-captcha">regex-captcha</a>&nbsp; &nbsp; <a href="utils.lsp.html#_load-files-in-dir">load-files-in-dir</a>&nbsp; &nbsp; <a href="utils.lsp.html#_into-ctx-assoc">into-ctx-assoc</a>&nbsp; &nbsp; 
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/docs/log.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>log.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>log.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;log.lsp</h2><p>Provides convenient logging facility for all of Dragonfly.</p>
-<b>Author: </b>Greg Slepak<br/>
- <p>To avoid checking the value of <tt>Dragonfly:LOG_LEVEL</tt> each time something is logged
- the logging functions that correspond to a lower logging level are disabled
- when this file is loaded.</p>
- <p>It is possible to change the <tt>LOG_LEVEL</tt> at runtime, but the way it is done
- is slightly tricky because <tt>MAIN:load</tt> is overwritten by Dragonfly
- to provide once-only loading. If you want to dynamically change the
- log-level (say in a plugin), then you will need to use the remapped <tt>sys-load</tt>
- function to force a reload of this file:</p>
- <pre> (context 'DF)
- (constant 'LOG_LEVEL 'LOG_DEBUG) ; enable debug logging at runtime
- (sys-load (string DRAGONFLY_ROOT "/lib/log.lsp"))
- (context MAIN)</pre>
- There are four log levels defined:
- <pre> (map set '(LOG_DEBUG LOG_INFO LOG_WARN LOG_ERROR)
-          '(        0        1        2         3))</pre>
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_log-func"></a><h3><font color=#CC0000>Dragonfly:log-func</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:log-func</font> <em>str-level</em> <em>str-msg</em>)</b><br/>
-<b>parameter: </b><em>str-level</em> - a string representing the log level (ex: "[DEBUG]: ")<br/>
-<b>parameter: </b><em>str-msg</em> - a string containing the message<br/>
- <br/>This function appends to the file specified by <tt>Dragonfly:LOG_FILE_PATH</tt>
- and prepends date information to the log.
- <pre> (log-func "[CRAZY!]: " (string user " just did something crazy!"))
- => Oct 26 01:44:24 [CRAZY!]: johnny-b just did something crazy!</pre>
- All other log functions call this one. You can override this function
- at runtime to provide your own logging behavior.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_log-debug"></a><h3><font color=#CC0000>Dragonfly:log-debug</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:log-debug</font>)</b><br/>
- <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[DEBUG]: "
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_log-info"></a><h3><font color=#CC0000>Dragonfly:log-info</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:log-info</font>)</b><br/>
- <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[INFO]: "
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_log-warn"></a><h3><font color=#CC0000>Dragonfly:log-warn</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:log-warn</font>)</b><br/>
- <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[WARNING]: "
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Dragonfly_log-err"></a><h3><font color=#CC0000>Dragonfly:log-err</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:log-err</font>)</b><br/>
- <br>String-concats its arguments and calls <tt>log-func</tt> with <em>level</em> set to "[ERROR]: "
-
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/docs/request.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>request.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>request.lsp</h1></center>
-<p><a href="index.html">Module index</a></p>
-<br/><br/><br/><h2>Module:&nbsp;request.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
- <h3>$GET/$POST</h3>
- These are very similar to the PHP $_GET and $_POST associative arrays.
- Use them to retrieve the GET/POST values.
- If a variable was specified, but no value assigned (i.e. <tt>/?foo</tt>), then
- the value will be an empty string (you can use <tt>empty?</tt> to check for this).
- If the variable does not exist, <tt>nil</tt> will be returned.
- <br><br>The values are url decoded:
- <pre> "What+time+is+it%3f"  => "What time is it?"</pre>
- <h3>$FILES</h3>
- If a <tt>multipart/form-data</tt> content type was submitted, then
- STDIN is read for the values. Any files are placed in <tt>$FILES</tt>, while
- other key/value pairs are placed in <tt>$POST</tt>.
- <br><br>The values in <tt>$FILES</tt> contain an associative array with more information
- about the files.
- <h3>$BINARY</h3>
- If the environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to
- "binary" then STDIN is read (up to <tt>MAX_POST_LENGTH</tt>) and the data is
- stored in <tt>$BINARY</tt>. Note that unlike the other symbols in this file,
- <tt>$BINARY</tt> is a string, not a function.
- <h3>$COOKIES</h3>
- The environment variable <tt>HTTP_COOKIE</tt> is parsed and the cookies are placed in
- in <tt>$COOKIES</tt> as key/value pairs just like <tt>$GET</tt> and <tt>$POST</tt>.
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_$GET"></a><h3><font color=#CC0000>$GET</font></h3>
-<b>syntax: (<font color=#CC0000>$GET</font> <em>str-key</em>)</b><br/>
-<p><b>return: </b>the value of the GET parameter for <em>str-key</em>, nil if no such GET variable was passed in.</p>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_$POST"></a><h3><font color=#CC0000>$POST</font></h3>
-<b>syntax: (<font color=#CC0000>$POST</font> <em>str-key</em>)</b><br/>
-<p><b>return: </b>the value of the POST parameter for <em>str-key</em>, nil if no such POST variable was passed in.</p>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_$FILES"></a><h3><font color=#CC0000>$FILES</font></h3>
-<b>syntax: (<font color=#CC0000>$FILES</font> <em>str-key</em>)</b><br/>
- <p>Returns an association list with keys <tt>'name</tt>, <tt>'data</tt>, and <tt>'length</tt> for the result
- of a <tt>multipart/form-data</tt> posted form.</p>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_$COOKIES"></a><h3><font color=#CC0000>$COOKIES</font></h3>
-<b>syntax: (<font color=#CC0000>$COOKIES</font> <em>str-key</em>)</b><br/>
-<p><b>return: </b>the value of the cookie with the key <em>str-key</em>, or nil if no such cookie exists.</p>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_$BINARY"></a><h3><font color=#CC0000>$BINARY</font></h3>
-<b>syntax: $BINARY</b><br/>
- <p>This is a global buffer that contains what was sent to STDIN (up to <tt>MAX_POST_LENGTH</tt>)
- when the value of environment variable <tt>HTTP_CONTENT_TRANSFER_ENCODING</tt> is set to "binary".</p>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/docs/response.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>response.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>response.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;response.lsp</h2><b>Author: </b>Greg Slepak<br/>
-
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_status"></a><h3><font color=#CC0000>Response:status</font></h3>
-<b>syntax: (<font color=#CC0000>Response:status</font>)</b><br/>
-<b>syntax: (<font color=#CC0000>Response:status</font> <em>int-code</em> [<em>str-description</em>])</b><br/>
- <p>In the first syntax, returns a list containing the current status code and corresponding description.</p>
- <p>In the second syntax, sets the response status to <em>int-code</em>, using the description from
- a built-in list. If the description for <em>int-code</em> is not found in the built-in
- list then an error will be thrown if <em>str-description</em> is not provided.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_header"></a><h3><font color=#CC0000>Response:header</font></h3>
-<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em>)</b><br/>
-<b>parameter: </b><em>str-key</em> - the header's name<br><br/>
-<b>syntax: (<font color=#CC0000>Response:header</font> <em>str-key</em> <em>str-value</em>)</b><br/>
-<b>parameter: </b><em>str-key</em> - the header's name<br/>
-<b>parameter: </b><em>str-value</em> - the header's value<br/>
- <br>In the first syntax, returns the header matching <em>str-key</em> or,
- if <em>str-key</em> is nil, all of the headers in an association list.
- <br>In the second syntax, sets or updates the header matching <em>str-key</em> or,
- if <em>str-value</em> is nil, deletes the header for <em>str-key</em>.
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_cookie"></a><h3><font color=#CC0000>Response:cookie</font></h3>
-<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em>)</b><br/>
-<b>parameter: </b><em>str-key</em> - the cookie's name<br><br/>
-<b>syntax: (<font color=#CC0000>Response:cookie</font> <em>str-key</em> <em>str-value</em> [<em>int-expires</em> [<em>str-path</em> [<em>str-domain</em> [<em>bool-http-only</em>]]]])</b><br/>
-<b>parameter: </b><em>str-key</em> - the cookie's name<br/>
-<b>parameter: </b><em>str-value</em> - the cookie's value<br/>
-<b>parameter: </b><em>int-expires</em> - (optional) the expiration date of the cookie as a unix timestamp; default is a session cookie<br/>
-<b>parameter: </b><em>str-path</em> - (optional) the cookie's path; default is the current path<br/>
-<b>parameter: </b><em>str-domain</em> - (optional) the cookie's domain; default is the current host<br/>
-<b>parameter: </b><em>bool-http-only</em> - (optional) whether the cookie may be read by client-side scripts<br/>
- <p>In the first syntax, <tt>cookie</tt> returns the value of the cookie named <em>str-key</em> or <tt>nil</tt>. If
- <em>str-key</em> is not provided, an association list of all cookie key/value pairs is returned.</p>
- <p>In the second syntax, <tt>cookie</tt> sets a new cookie. If <em>str-value</em> is nil then any existing
- cookie is deleted, otherwise it is updated with the value and the rest of the parameters.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_send-headers"></a><h3><font color=#CC0000>Response:send-headers</font></h3>
-<b>syntax: (<font color=#CC0000>Response:send-headers</font>)</b><br/>
- <p>Actually sends the headers (without buffering them to <tt>Dragonfly:STDOUT</tt>).
- Normally you should never call this yourself!</p>
-
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_redirect"></a><h3><font color=#CC0000>Response:redirect</font></h3>
-<b>syntax: (<font color=#CC0000>Response:redirect</font> <em>str-url</em>)</b><br/>
-<b>parameter: </b><em>str-url</em> - The URL you'd like to send them to<br/>
- <p>Does an immediate 302 Found redirect and calls <tt>exit</tt>.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_send-headers-with-status"></a><h3><font color=#CC0000>Response:send-headers-with-status</font></h3>
-<b>syntax: (<font color=#CC0000>Response:send-headers-with-status</font> <em>int-code</em> <em>str-description</em>)</b><br/>
- <p>Convenience. Combines a call to <tt>Response:status</tt> and <tt>Response:send-headers</tt>.
- As this calls <tt>send-headers</tt>, you typically do not want to call this yourself!</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_content-type"></a><h3><font color=#CC0000>Response:content-type</font></h3>
-<b>syntax: (<font color=#CC0000>Response:content-type</font> <em>str-value</em>)</b><br/>
- <p>Convenience for calling <tt>(Response:header "Content-Type" str-value)</tt>.</p>
- <p>If <em>str-value</em> is nil, returns the current content-type value</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="Response_extension->type"></a><h3><font color=#CC0000>Response:extension->type</font></h3>
-<b>syntax: (<font color=#CC0000>Response:extension->type</font> <em>str-file-extension</em>)</b><br/>
- <p>Given a file extension (with or without a preceding dot), returns the
- MIME-type for that extension. Currently only a small number of file extensions
- are supported by default, see the source in lib/response.lsp for a complete list.</p>
-
-
-
-
-
-
-
-
-
-
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/docs/utils.lsp.html

-<!DOCTYPE HTML PUBLIC "HTML 4.01 Transitional">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>utils.lsp</title>
-
-<link rel="stylesheet" type="text/css" href="newlispdoc.css" />
-</head>
-
-<body style="margin: 20px;" text="#111111" bgcolor="#FFFFFF" 
-			link="#376590" vlink="#551A8B" alink="#ffAA28">
-<blockquote>
-<center><h1>utils.lsp</h1></center>
-<p><a href="index.html">Module index</a></p><br/><br/><br/><h2>Module:&nbsp;utils.lsp</h2><b>Author: </b>Greg Slepak <greg at taoeffect.com><br/>
- <p>This file not only provides the functions documented below, but
- it also plays a role in globally overriding certain functions in the MAIN context.</p>
- <p>The overridden functions include: <tt>load</tt>, <tt>print</tt>, and <tt>println</tt>.</p>
- <p><tt>load</tt> is overwritten to load a file only once, while <tt>print</tt> and <tt>println</tt>
- are overwritten to send their output the the <tt>Dragonfly:STDOUT</tt> buffer, allowing
- Dragonfly to ensure pages are displayed properly.</p>
-
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_regex-captcha"></a><h3><font color=#CC0000>regex-captcha</font></h3>
-<b>syntax: (<font color=#CC0000>regex-captcha</font> <em>str-regex</em> <em>str</em> [<em>int-options</em>] [<em>int-captcha</em>])</b><br/>
-<b>parameter: </b><em>int-options</em> - options to regex, defaults to 0.<br/>
-<b>parameter: </b><em>int-captch</em> - which of the regex group captures to return, defaults to 1.<br/>
- <p>Returns the captured text, or nil if it couldn't be captured.<br/>This is a global function.</p>
- <b>example:</b>
- <pre> (regex-captcha {^(foo|bar).*} "foobaz") => "foo"
- (regex-captcha {^(foo|bar).*} "bazfoo") => nil</pre>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_load-files-in-dir"></a><h3><font color=#CC0000>load-files-in-dir</font></h3>
-<b>syntax: (<font color=#CC0000>load-files-in-dir</font> <em>str-dir</em> <em>regex-match</em>)</b><br/>
- <p>Loads all the files in <em>str-dir</em> matching <em>regex-match</em>. Does not
- traverse subdirectories.<br/>This is a global function.</p>
-<br/><br/>
-<br/><br/><center>- &sect; -</center><br/>
-<a name="_into-ctx-assoc"></a><h3><font color=#CC0000>into-ctx-assoc</font></h3>
-<b>syntax: (<font color=#CC0000>into-ctx-assoc</font> <em>ctx</em> <em>list-assoc</em>)</b><br/>
- <p>Places the key/value pairs in <em>list-assoc</em> into the context <em>ctx</em>
- to be used as a lookup table.<br/>This is a global function.</p>
- <b>example:</b>
- <pre> (new Tree 'MyCtx)
- (into-ctx-assoc MyCtx '(
-     ("key" "value")
-     ("apple" "mmmm... good")
-     ("organic?" true)
- ))</pre>
-<br/><br/>
-
-<br/><br/><center>- &part; -</center><br/>
-<center><font face='Arial' size='-2' color='#444444'>
-generated with <a href="http://newlisp.org">newLISP</a>&nbsp;
-and <a href="http://newlisp.org/newLISPdoc.html">newLISPdoc</a>
-</font></center>
-</blockquote>
-</body>
-</html>

example-site/dragonfly-framework/dragonfly.lsp

 ;; @module dragonfly.lsp
 ;; @description The heart of Dragonfly - A newLISP web framework for rapid web development.
 ;; @version 0.50
-;; @author Greg Slepak, Marc Hildmann (Team Dragonfly 2009)
+;; @author Team Dragonfly 2009
 ;; @location http://code.google.com/p/dragonfly-newlisp/
 ;; <br>This file is the main entry-point of the Dragonfly framework and
 ;; contains several important functions, as well as the default route
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.