print $query=textfield('username', 'anonymous');
In the "named parameters" style,
the parameters can be assigned like a hash, and the order
doesn't matter. For example:
print $query->textfield(-name=>'name',
-default=>'value');
If you want to use named parameters, just call the
use_named_parameters method early in the script.
Which syntax style should you use? It depends on how lazy you are and
how much control you need. Generally, standard syntax is faster to
type. However, it is also harder to read, and there are many features
that are simply not available using standard syntax (such as
JavaScript support). In general, we recommend using the named
parameters syntax for all but the most trivial scripts.
 |  |  |
10.3. Maintaining State |  | 10.5. Using JavaScript Features |