CGI::Builder::Session is a CGI::Builder and CGI::Session integration.
This module transparently integrates CGI::Builder and CGI::Session in a very handy and flexible framework that can save you some coding. It provides you a mostly automatic and ready to use CGI::Session object (cs property) useful to maintain the state of your application between requests. Please refer to CGI::Session for more documentation about sessions.
How it works
This extension creates a CGI::Session object automatically, using the old session id if it is found as a cookie or as a query param. If no session id is found, it creates a new session and automatically adds a session id cookie and a session id param that will be automatically used to send the id to the client
In simple cases you can avoid to init, update and flush the session: just use it and it will work as expected; if you need more customization you can override every single argument, property or even method.
Note: When you include in your CBB the CGI::Builde::Magic extension, you will have magically available a label that will be substituted with the current session id.