sqawk-discuss Mailing List for SQAwk
Status: Abandoned
Brought to you by:
jhart
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|
|
From: <jh...@av...> - 2002-12-03 04:04:03
|
SQAwk v1.2 is a significant departure from v1.1.x. There are 4 main
design differences:
1. No automatic looping of the script.
* Since there's no real reason to read stdin in a CGI program, the
code of a sqawk page is executed entirely within a BEGIN block. The
sqawk script writer doesn't have to deal with the normal AWK looping.
Functions can be used by putting them after the normal code. No curly
braces in between. SQAwk will detect them automatically.
2. All form fields and environment variables are automatically
defined as global variables accessible within the script, akin to PHP,
rather than being passed in via stdin, as was done in previous versions.
There's no need to use the ENVIRON array, although it's available, of
course. The form fields are also available as an array called
form_fields, indexed by field name.
* The values are URL decoded and any end-of-line combination
(c/r-l/f, c/r or l/f) is converted to newline (l/f).
* For security, form fields that have the same name as
environment variables are ignored.
* If the same field appears more than once in a GET or POST, e.g.
check boxes, the multiple values are separated by SUBSEP. Thus, the
script writer will have to split the field using SUBSEP to get at the
individual values.
3. Page type is assumed to be HTML, i.e. the Content-type header is
sent to the browser automatically. It can be overridden by putting a
Content-type header in the sqawk page.
4. At the moment, the variable printing shorthand isn't supported,
i.e.:
<?$somevariable?>
has to be written as:
<?printf somevariable?>
Because of these changes, v1.1.x sqawk pages are not compatible with
v1.2 and will have to be converted.
--
Jim Hart
"Indecision is the key to flexibility."
|