Sounds like you need a simple session object to keep track of things for you. This would have a session id that can be passed around via cookies or by the URL. Then you use that session id to reanimate an old session or create a new session if one isn't already found. Here are a few things to chew on:
- You definately want to use a database. Which rdbms is an exercise left up to you as you know your requirements best.
- use Digest::MD5 qw(md5_base64) to generate your session ids. Start with something like md5_base64(localtime() . rand() )
- If everything is going to be perl, use your backend storeage to store your session objects data cargo serialized (use Data::Serializer for example). This will simplify your initial module letting you get on to the juicier parts. Keep your interface clean and simple so that you can swap this out later if needs be.
- Don't forget the useful things to track such as the last requested page, ip address, time, etc. This is a great opportunity to unify your session handling with some form of db logging.
- You might also benefit from the use of mod_perl.
You can easily roll your own, or take a look at Apache::Session.
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
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.