Sessions
- HTTP is stateless
- Ask browser to remember stuff for you:
- Username/password ("Basic" authentication)
- Any key/value pair ("cookie")
- Various Perl modules automate cookie handling
- General idea
- look for incoming cookie with our key
- if present, its value is a "session ID"
- if not, send browser a new ID to remember
- look up ID in persistent storage (file, DBI, IPC, ...)
- run handler with corresponding data
- update data in storage if desired
- Embperl
- read/write to %udat automagically does all that (after
configuring desired sort of session storage)
- Apache::ASP
- Similar to Embperl but via %session
- Manually
- DBI, Storable, FreezeThaw, MLDBM, IPC, ...