I've never used CGI::Session so I can't comment on it, but here's one thing you should think about: a session is not the right place to cache data! If you put, for example, someone's search results into her session so that you can display them 20 at a time, and then she opens a second browser window and does another search at the same time, all hell will break loose. It's better to cache data under some canonical name (e.g. string the search parameters together to form a unique ID) and store it with something like
.