The time I wrote such a wizard, I followed the following
criteria :
- All data is collected within the wizard until the last page via hidden fields.
This took away the burden of server-side session management and allowed
for easy automation, as any program would simply have to feed the last page of the
wizard with all the data in one request.
- All pages had names (instead of numbers), which I then correlated
to the functions that displayed the page via a hash. This allowed me
to nicely group the interesting stuff of one page together in one
place in the code.
- The navigation had to be via submit buttons, as otherwise
the passing of hidden fields wouldn't have worked. This of course
broke the navigational features of the browsers, but in
a way that didn't create maintenance or diagnosis headaches.
The resulting wizard framework was nice, as adding another page
meant adding another sub, connecting that sub to the name of the page
and inserting the name of the page in the sequence of pages. Adding
more fields to the wizard also only meant to make the new variables
known to the wizard (so that they would survive changing the page)
and adding a way to set those values.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.